Skip to content

Commit

Permalink
Add https swagger server
Browse files Browse the repository at this point in the history
  • Loading branch information
tsundvoll committed Apr 18, 2023
1 parent 1de49ad commit 19189c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@
{
c.PreSerializeFilters.Add((swaggerDoc, httpReq) =>
{
swaggerDoc.Servers = new List<OpenApiServer> { new OpenApiServer { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}{basePath}" } };
swaggerDoc.Servers = new List<OpenApiServer> {
new OpenApiServer { Url = $"https://{httpReq.Host.Value}{basePath}" },
new OpenApiServer { Url = $"http://{httpReq.Host.Value}{basePath}" }
};
});
});
app.UseSwaggerUI(
Expand Down

0 comments on commit 19189c8

Please sign in to comment.