This repository was archived by the owner on Jan 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
packages/serverless-components/nextjs-component/src Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1046,7 +1046,7 @@ class NextjsComponent extends Component {
1046
1046
"origin-response" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } `
1047
1047
}
1048
1048
} ;
1049
- cloudFrontOrigins [ 1 ] . pathPatterns [
1049
+ cloudFrontOrigins [ 1 ] . pathPatterns [
1050
1050
this . pathPattern ( "/shop" , routesManifest )
1051
1051
] = {
1052
1052
minTTL : 0 ,
@@ -1065,6 +1065,25 @@ class NextjsComponent extends Component {
1065
1065
"origin-response" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } `
1066
1066
}
1067
1067
} ;
1068
+ cloudFrontOrigins [ 1 ] . pathPatterns [
1069
+ this . pathPattern ( "/software-and-services*" , routesManifest )
1070
+ ] = {
1071
+ minTTL : 0 ,
1072
+ defaultTTL : 0 ,
1073
+ maxTTL : 86400 ,
1074
+ forward : {
1075
+ cookies : "all" ,
1076
+ headers : routesManifest . i18n
1077
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
1078
+ : [ "Authorization" , "Host" ] ,
1079
+ queryString : true
1080
+ } ,
1081
+ // lambda@edge key is last and therefore cannot be overridden
1082
+ "lambda@edge" : {
1083
+ "origin-request" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } ` ,
1084
+ "origin-response" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } `
1085
+ }
1086
+ } ;
1068
1087
1069
1088
// If we are using consolidated API pages (within default lambda), we need to ensure api/* behavior is set correctly.
1070
1089
// Note that if there are no consolidated API pages then existing api/* is not deleted.
You can’t perform that action at this time.
0 commit comments