tencentcloud-edgeone-migration-nodejs-v2
Version:
tencentcloud cdn config copy to edgeone
42 lines (38 loc) • 1.02 kB
JavaScript
const { t } = require("../../i18n/trans");
const genLog = require("../../logGenerator");
function PostMaxSize(domain, domainConfig, ruleTransferLog) {
const keyConfig = domainConfig.PostMaxSize;
if (keyConfig.Switch !== 'on') {
ruleTransferLog.push({
config: t('POST请求大小配置(PostMaxSize)'),
result: t('未配置'),
detail: ''
});
genLog.defaultLog(`${t('POST请求大小配置(PostMaxSize)')}${t('未配置')}`)
return null;
}
ruleTransferLog.push({
config: t('POST请求大小配置(PostMaxSize)'),
result: t('成功'),
detail: ''
});
genLog.successLog(`${t('POST请求大小配置(PostMaxSize)')}${t('成功')}`)
return {
'NormalAction': {
'Action': 'PostMaxSize',
'Parameters': [
{
'Name': 'Switch',
'Values': [
'on'
]
},
{
'Name': 'MaxSize',
'Values': [String(keyConfig.MaxSize)]
}
]
}
};
}
module.exports = PostMaxSize;