-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour Prefixes (for CDK v2 upgrade) #1401
Conversation
additionalBehaviors[`${prefix.prefix}*`] = { | ||
origin: s3Origin, | ||
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS, | ||
edgeLambdas: prefix.edgeLambdas, | ||
edgeLambdas: prefix.behaviourOverride.edgeLambdas, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of just passing the edge lambda you can do this:
additionalBehaviors[`${prefix.prefix}*`] = {
origin: s3Origin,
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
originRequestPolicy: originRequestPolicy,
cachePolicy: originCachePolicy,
responseHeadersPolicy: responseHeadersPolicy,
...prefix.behaviourOverride,
};
Because that will then allow you to override any of the properties if you need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@finn-holland-aligent this one hasn't been resolved yet
@@ -140,11 +140,14 @@ export interface StaticHostingProps { | |||
enableStaticFileRemap?: boolean; | |||
|
|||
/** | |||
* Any prefixes to remapping that should be included in the path such as au or nz | |||
* Overrides default behaviour paths with a prefix and takes in options to apply to each static file behaviour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options don't apply to the static file behaviour do they?
6049cea
to
faa19f8
Compare
1445070
to
4dc214d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description of the proposed changes
id
tag to prerender function names to avoid duplicate named function issuesbehaviourPrefixes
to allow for behaviours on regional prefixes such asau/
ornz/
Notes to reviewers
🛈 When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback