@@ -25,6 +25,10 @@ Parameters:
2525 S3BucketPrefix :
2626 Description : S3 bucket prefix which will ensure global uniqueness
2727 Type : String
28+ CloudfrontOriginSecret :
29+ NoEcho : true
30+ Description : Value for X-Origin-Verify passed to Lambda URL from cloudfront
31+ Type : String
2832
2933Conditions :
3034 IsDev : !Equals [!Ref RunEnvironment, "dev"]
@@ -220,7 +224,7 @@ Resources:
220224 EntraRoleArn : !GetAtt AppSecurityRoles.Outputs.EntraFunctionRoleArn
221225 LinkryKvArn : !GetAtt LinkryRecordsCloudfrontStore.Arn
222226 AWS_CRT_NODEJS_BINARY_RELATIVE_PATH : node_modules/aws-crt/dist/bin/linux-arm64-glibc/aws-crt-nodejs.node
223- ORIGIN_VERIFY_KEY : !Join ['-', ['secret', !Select [4, !Split ['-', !Select [2, !Split ['/', ! Ref AWS::StackId]]]]]]
227+ ORIGIN_VERIFY_KEY : !Ref CloudfrontOriginSecret
224228 NODE_OPTIONS : --enable-source-maps
225229 VpcConfig :
226230 Ipv6AllowedForDualStack : !If [ShouldAttachVpc, True, !Ref AWS::NoValue]
@@ -340,7 +344,7 @@ Resources:
340344 OriginProtocolPolicy : https-only
341345 OriginCustomHeaders :
342346 - HeaderName : X-Origin-Verify
343- HeaderValue : !Join ['-', ['secret', !Select [4, !Split ['-', !Select [2, !Split ['/', ! Ref AWS::StackId]]]]]]
347+ HeaderValue : !Ref CloudfrontOriginSecret
344348 Enabled : true
345349 DefaultRootObject : index.html
346350 Aliases :
@@ -545,7 +549,7 @@ Resources:
545549 OriginProtocolPolicy : https-only
546550 OriginCustomHeaders :
547551 - HeaderName : X-Origin-Verify
548- HeaderValue : !Join ['-', ['secret', !Select [4, !Split ['-', !Select [2, !Split ['/', ! Ref AWS::StackId]]]]]]
552+ HeaderValue : !Ref CloudfrontOriginSecret
549553 Enabled : true
550554 Aliases :
551555 - !Join
0 commit comments