【新增】Swagger访问增加简单权限验证,防止api文档投产情况下未特意屏蔽api文档访问权限的问题。

This commit is contained in:
jianweie code
2023-12-17 01:02:37 +08:00
parent fbc68f72dc
commit 432614ffd0
5 changed files with 100 additions and 0 deletions

View File

@@ -144,6 +144,25 @@ namespace CoreCms.Net.Configuration
public static readonly string WeiXinAppSecret = AppSettingsHelper.GetContent("WeChatOptions", "WeiXinAppSecret");
#endregion
#region Swagger授权访问设置================================================================================
/// <summary>
/// Swagger文档默认访问路由地址
/// </summary>
public static readonly string SwaggerRoutePrefix = AppSettingsHelper.GetContent("SwaggerConfig", "RoutePrefix");
/// <summary>
/// Swagger文档登录账号
/// </summary>
public static readonly string SwaggerUserName = AppSettingsHelper.GetContent("SwaggerConfig", "UserName");
/// <summary>
/// Swagger文档登录密码
/// </summary>
public static readonly string SwaggerPassWord = AppSettingsHelper.GetContent("SwaggerConfig", "PassWord");
#endregion
}