版本
RG3.PF.Web.StartUsed.6.0.17 以上
app_security
#region 数据安全加密 start
var configurationAppAuthSecurity = _configurationBuilderService.GetConfigurationAppAuthSecurity(pf.OwnerId, pf.SysId);
var resultSecurityVI = configurationAppAuthSecurity.GetValue<string>("transmission:securityVI");
var resultSecurityMethod = configurationAppAuthSecurity.GetValue<string>("transmission:securityMethod");
var resultSecurityKey = configurationAppAuthSecurity.GetValue<string>("transmission:securityKey");
dictionaryUrl["transmissionSecurityVI"] = resultSecurityVI;
dictionaryUrl["transmissionSecurityMethod"] = resultSecurityMethod;
dictionaryUrl["transmissionSecurityKey"] = resultSecurityKey;
#endregion 数据安全加密 end
"transmission": {
"securityVI": "0",
"securityMethod": "des",
"securityKey": ""
}
插件地址:\Config\AppNodeJs\Plugins
EncryptBodyFilter
EncryptResultFilter
app.json
"operation": {
"encryptResult": false, // 输出结果加密
"encryptBody": false // 表单、body等数据提交加密处理
},
Startup$Provider.cs
services.AddMvcCore(options =>
{
//接口 XverifyApi 合法性验证
if (_configuration.GetValue<bool>("operation:verifyApi"))
{
options.Filters.Add<VerifyApiFilter>();
}
//用户登录拦截
if (_configuration.GetValue<bool>("operation:userFilter"))
{
options.Filters.Add<UserFilter>();
}
// 请求body等参数加密
if (_configuration.GetValue<bool>("operation:encryptBody"))
{
options.Filters.Add<EncryptBodyFilter>();
}
//用户行为记录
if (_configuration.GetValue<bool>("operation:userBehavior"))
{
options.Filters.Add<UserBehaviorFilter>();
}
//用户操作日志
if (_configuration.GetValue<bool>("operation:userLog"))
{
options.Filters.Add<UserLogFilter>();
}
// 输出结果加密
if (_configuration.GetValue<bool>("operation:encryptResult"))
{
options.Filters.Add<EncryptResultFilter>();
}
});
}
文档更新时间: 2022-07-11 13:20 作者:admin