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
9
9
{
10
10
public sealed class Startup
11
11
{
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.
13
13
public void ConfigureServices ( IServiceCollection services )
14
14
{
15
15
services . AddDbContext < SampleDbContext > (
16
16
options => options . UseSqlite ( "Data Source=sample.db" ) ) ;
17
17
18
- services . AddJsonApi < SampleDbContext > (
19
- options => options . Namespace = "api" ) ;
18
+ services . AddJsonApi < SampleDbContext > ( options =>
19
+ {
20
+ options . Namespace = "api" ;
21
+ //options.RelativeLinks = true;
22
+ } ) ;
20
23
}
21
24
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.
23
26
public void Configure ( IApplicationBuilder app , SampleDbContext context )
24
27
{
25
28
context . Database . EnsureDeleted ( ) ;
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ protected string GetBasePath()
226
226
{
227
227
if ( _options . RelativeLinks )
228
228
{
229
- return string . Empty ;
229
+ return $ "/ { _currentRequest . BasePath } " ;
230
230
}
231
231
232
232
return _currentRequest . BasePath ;
You can’t perform that action at this time.
0 commit comments