mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58:01 +08:00
⚠️feat: 正式环境去掉swagger界面
This commit is contained in:
@@ -241,13 +241,6 @@ namespace OpenAuth.WebApi
|
||||
{
|
||||
loggerFactory.AddLog4Net();
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseMiniProfiler();
|
||||
|
||||
//可以访问根目录下面的静态文件
|
||||
var staticfile = new StaticFileOptions
|
||||
{
|
||||
@@ -277,8 +270,14 @@ namespace OpenAuth.WebApi
|
||||
//配置ServiceProvider
|
||||
AutofacContainerModule.ConfigServiceProvider(app.ApplicationServices);
|
||||
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseMiniProfiler();
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseSwagger();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
|
||||
// specifying the Swagger JSON endpoint.
|
||||
|
Reference in New Issue
Block a user