mirror of
https://github.com/bitwarden/server.git
synced 2025-02-03 23:51:21 +01:00
set swagger host
This commit is contained in:
parent
61f473390f
commit
14ecb8af93
@ -191,11 +191,14 @@ namespace Bit.Api
|
||||
// Add MVC to the request pipeline.
|
||||
app.UseMvc();
|
||||
|
||||
// Add Swagger
|
||||
if(Environment.IsDevelopment() || globalSettings.SelfHosted)
|
||||
{
|
||||
app.UseSwagger(config =>
|
||||
{
|
||||
config.RouteTemplate = "specs/{documentName}/swagger.json";
|
||||
config.PreSerializeFilters.Add(
|
||||
(swaggerDoc, httpReq) => swaggerDoc.Host = globalSettings.BaseServiceUri.Api);
|
||||
});
|
||||
app.UseSwaggerUI(config =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user