Api prefix from env

This commit is contained in:
MaxchilKH 2020-07-18 16:44:59 +02:00 committed by Gitea
parent 99c094390a
commit d09a1bd25a
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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()