新增 swaggerui 开发环境条件限制
This commit is contained in:
parent
8c4ecac249
commit
eab1d9e653
|
|
@ -48,12 +48,11 @@ namespace Learn.VideoAnalysis.API
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
AppCommon.Services = app.Services;
|
AppCommon.Services = app.Services;
|
||||||
|
app.UseMiddleware<BasicAuthMiddleware>("Swagger");
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (app.Environment.IsDevelopment())
|
|
||||||
{
|
app.UseSwagger();
|
||||||
app.UseSwagger();
|
app.UseSwaggerUI();
|
||||||
app.UseSwaggerUI();
|
|
||||||
}
|
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue