File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
JsonApiDotNetCore/Serialization/Server/Builders Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,20 @@ namespace GettingStarted
99{
1010 public sealed class Startup
1111 {
12- // This method gets called by the runtime. Use this method to add services to the container.
12+ // This method gets called by the runtime. Use this method to add services to the container.
1313 public void ConfigureServices ( IServiceCollection services )
1414 {
1515 services . AddDbContext < SampleDbContext > (
1616 options => options . UseSqlite ( "Data Source=sample.db" ) ) ;
1717
18- services . AddJsonApi < SampleDbContext > (
19- options => options . Namespace = "api" ) ;
18+ services . AddJsonApi < SampleDbContext > ( options =>
19+ {
20+ options . Namespace = "api" ;
21+ //options.RelativeLinks = true;
22+ } ) ;
2023 }
2124
22- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
25+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
2326 public void Configure ( IApplicationBuilder app , SampleDbContext context )
2427 {
2528 context . Database . EnsureDeleted ( ) ;
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ protected string GetBasePath()
226226 {
227227 if ( _options . RelativeLinks )
228228 {
229- return string . Empty ;
229+ return $ "/ { _currentRequest . BasePath } " ;
230230 }
231231
232232 return _currentRequest . BasePath ;
You can’t perform that action at this time.
0 commit comments