From 933910fab45b02365656b05678ebc48500fbbfc7 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Sat, 4 May 2024 11:44:40 +0200 Subject: [PATCH] Remove duplicate domain from CORS. fix #16 --- template/cloudformationTemplate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/cloudformationTemplate.js b/template/cloudformationTemplate.js index 22f1897..107476c 100644 --- a/template/cloudformationTemplate.js +++ b/template/cloudformationTemplate.js @@ -174,7 +174,7 @@ module.exports = { { AllowedHeaders: ['*'], AllowedMethods: ['PUT', 'POST', 'DELETE', 'HEAD', 'GET'], - AllowedOrigins: [{ 'Fn::If': ['DeployCustomDomain', { 'Fn::Sub': 'https://${CustomDomain}' }, 'https://console.rhosys.ch'] }, 'https://console.rhosys.ch', 'http://localhost:8080'], + AllowedOrigins: [{ 'Fn::If': ['DeployCustomDomain', { 'Fn::Sub': 'https://${CustomDomain}' }, { Ref: 'AWS::NoValue' }] }, 'https://console.rhosys.ch', 'http://localhost:8080'], ExposedHeaders: ['x-amz-request-id'], MaxAge: 3600 }