Skip to content

Commit

Permalink
spread behaviouroverride props
Browse files Browse the repository at this point in the history
  • Loading branch information
finnholland committed Oct 29, 2024
1 parent faa19f8 commit ace316a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/static-hosting/lib/static-hosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,17 +576,15 @@ export class StaticHosting extends Construct {

props.defaultBehaviourPrefixes?.forEach(prefix => {
additionalBehaviors[`${prefix.prefix}*`] = {
origin: prefix.behaviourOverride.origin ?? s3Origin,
origin: s3Origin,
viewerProtocolPolicy:
prefix.behaviourOverride.viewerProtocolPolicy ??
ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
edgeLambdas: prefix.behaviourOverride.edgeLambdas,
originRequestPolicy:
prefix.behaviourOverride.originRequestPolicy ?? originRequestPolicy,
cachePolicy: prefix.behaviourOverride.cachePolicy ?? originCachePolicy,
originRequestPolicy: originRequestPolicy,
cachePolicy: originCachePolicy,
responseHeadersPolicy:
prefix.behaviourOverride.responseHeadersPolicy ??
responseHeadersPolicy,
...prefix.behaviourOverride
};
});

Expand Down

0 comments on commit ace316a

Please sign in to comment.