From 01bf4c1c1fd9e1e3def5dd1a69cc67c056fd6ca1 Mon Sep 17 00:00:00 2001 From: wss-git Date: Tue, 15 Nov 2022 17:05:28 +0800 Subject: [PATCH] custom domain qualifier need to string --- src/entry-public-method/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/entry-public-method/index.ts b/src/entry-public-method/index.ts index 4432a7ae..976087bb 100644 --- a/src/entry-public-method/index.ts +++ b/src/entry-public-method/index.ts @@ -45,6 +45,17 @@ export default class EntryPublicMethod { tipLayerArn(inputs.props?.region, inputs.props?.function?.layers, inputs.project?.access); } + // Fix: https://github.com/devsapp/fc/issues/876 + if (!_.isEmpty(inputs.props?.customDomains)) { + inputs.props.customDomains = _.map(inputs.props.customDomains, (item) => ({ + ...(item || {}), + routeConfigs: _.map(item.routeConfigs || [], i => ({ + ...(i || {}), + qualifier: _.isNumber(i?.qualifier) ? i.qualifier.toString() : i?.qualifier, + })) + })) + } + await InfraAsTemplate.modifyInputs(inputs); // 多环境处理 try {