Api prefix from env
This commit is contained in:
parent
99c094390a
commit
d09a1bd25a
@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
CONNECTIONSTRINGS__INTERNSHIPDATABASE: "Host=db.postgres;Port=5432;Database=postgres;Username=postgres;Password=szwoniu"
|
||||
ASPNETCORE_ENVIRONMENT: Development
|
||||
APIPREFIX: /api
|
||||
depends_on:
|
||||
- db.postgres
|
||||
ports:
|
||||
@ -19,4 +20,3 @@ services:
|
||||
PGDATA: /postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
@ -42,7 +42,7 @@ namespace InternshipSystem.Api
|
||||
|
||||
app
|
||||
.UseSwagger()
|
||||
.UseSwaggerUI(options => options.SwaggerEndpoint("/api/swagger/v1/swagger.json", "InternshipSystem Api"))
|
||||
.UseSwaggerUI(options => options.SwaggerEndpoint(Path.Join(Configuration.GetValue<string>("ApiPrefix"), "/swagger/v1/swagger.json"), "InternshipSystem Api"))
|
||||
.UseHttpsRedirection()
|
||||
.UseRouting()
|
||||
.UseAuthorization()
|
||||
|
Loading…
Reference in New Issue
Block a user