@@ -25,6 +25,10 @@ Parameters:
25
25
S3BucketPrefix :
26
26
Description : S3 bucket prefix which will ensure global uniqueness
27
27
Type : String
28
+ CloudfrontOriginSecret :
29
+ NoEcho : true
30
+ Description : Value for X-Origin-Verify passed to Lambda URL from cloudfront
31
+ Type : String
28
32
29
33
Conditions :
30
34
IsDev : !Equals [!Ref RunEnvironment, "dev"]
@@ -220,7 +224,7 @@ Resources:
220
224
EntraRoleArn : !GetAtt AppSecurityRoles.Outputs.EntraFunctionRoleArn
221
225
LinkryKvArn : !GetAtt LinkryRecordsCloudfrontStore.Arn
222
226
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
224
228
NODE_OPTIONS : --enable-source-maps
225
229
VpcConfig :
226
230
Ipv6AllowedForDualStack : !If [ShouldAttachVpc, True, !Ref AWS::NoValue]
@@ -340,7 +344,7 @@ Resources:
340
344
OriginProtocolPolicy : https-only
341
345
OriginCustomHeaders :
342
346
- HeaderName : X-Origin-Verify
343
- HeaderValue : !Join ['-', ['secret', !Select [4, !Split ['-', !Select [2, !Split ['/', ! Ref AWS::StackId]]]]]]
347
+ HeaderValue : !Ref CloudfrontOriginSecret
344
348
Enabled : true
345
349
DefaultRootObject : index.html
346
350
Aliases :
@@ -545,7 +549,7 @@ Resources:
545
549
OriginProtocolPolicy : https-only
546
550
OriginCustomHeaders :
547
551
- HeaderName : X-Origin-Verify
548
- HeaderValue : !Join ['-', ['secret', !Select [4, !Split ['-', !Select [2, !Split ['/', ! Ref AWS::StackId]]]]]]
552
+ HeaderValue : !Ref CloudfrontOriginSecret
549
553
Enabled : true
550
554
Aliases :
551
555
- !Join
0 commit comments