UNPKG

tencentcloud-edgeone-migration-nodejs-v2

Version:

tencentcloud cdn config copy to edgeone

37 lines (31 loc) 807 B
const { t } = require("../../i18n/trans"); const genLog = require("../../logGenerator"); function PostMaxSize(domain, domainConfig, ruleTransferLog) { const keyConfig = domainConfig.PostMaxSize; const isOn = keyConfig.Switch === 'on'; ruleTransferLog.push({ config: t('POST请求大小配置(PostMaxSize)'), result: t('成功'), detail: '' }); genLog.successLog(`${t('POST请求大小配置(PostMaxSize)')}${t('成功')}`) const parameters = [ { 'Name': 'Switch', 'Values': [isOn ? 'on' : 'off'] } ]; if (isOn) { parameters.push({ 'Name': 'MaxSize', 'Values': [String(keyConfig.MaxSize)] }); } return { 'NormalAction': { 'Action': 'PostMaxSize', 'Parameters': parameters } }; } module.exports = PostMaxSize;