feat: 增加 UseHttps 配置

#Comment
通过配置可以使用纯 http 协议
This commit is contained in:
Argo Zhang 2019-12-03 22:56:02 +08:00
parent 93af3948be
commit 0ef303540e
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 4 additions and 3 deletions

View File

@ -109,7 +109,7 @@ namespace Bootstrap.Admin
}
app.UseStatusCodePagesWithReExecute("/Home/Error/{0}");
app.UseHttpsRedirection();
if (Configuration.GetValue("UseHttps", true)) app.UseHttpsRedirection();
app.UseResponseCompression();
app.UseStaticFiles();
app.UseAutoGenerateDatabase();

View File

@ -1,4 +1,4 @@
{
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
@ -61,6 +61,7 @@
}
],
"AppId": "BA",
"UseHttps": true,
"UseBlazor": true,
"SwaggerPathBase": "",
"AllowOrigins": "http://localhost,http://ba.sdgxgz.cn",
@ -312,4 +313,4 @@
}
]
}
}
}