@@ -424,7 +424,6 @@ class NextjsComponent extends Component {
424
424
] ;
425
425
426
426
console . log ( cloudFrontOrigins [ 0 ] ) ;
427
-
428
427
429
428
cloudFrontOrigins [ 1 ] . pathPatterns [
430
429
this . pathPattern ( "_next/static/*" , routesManifest )
@@ -839,8 +838,8 @@ class NextjsComponent extends Component {
839
838
forward : {
840
839
cookies : "all" ,
841
840
headers : routesManifest . i18n
842
- ? [ "Accept-Language" , "Authorization" , "Host" ]
843
- : [ "Authorization" , "Host" ] ,
841
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
842
+ : [ "Authorization" , "Host" ] ,
844
843
queryString : true
845
844
} ,
846
845
// lambda@edge key is last and therefore cannot be overridden
@@ -859,8 +858,8 @@ class NextjsComponent extends Component {
859
858
forward : {
860
859
cookies : "all" ,
861
860
headers : routesManifest . i18n
862
- ? [ "Accept-Language" , "Authorization" , "Host" ]
863
- : [ "Authorization" , "Host" ] ,
861
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
862
+ : [ "Authorization" , "Host" ] ,
864
863
queryString : true
865
864
} ,
866
865
// lambda@edge key is last and therefore cannot be overridden
@@ -879,8 +878,8 @@ class NextjsComponent extends Component {
879
878
forward : {
880
879
cookies : "all" ,
881
880
headers : routesManifest . i18n
882
- ? [ "Accept-Language" , "Authorization" , "Host" ]
883
- : [ "Authorization" , "Host" ] ,
881
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
882
+ : [ "Authorization" , "Host" ] ,
884
883
queryString : true
885
884
} ,
886
885
// lambda@edge key is last and therefore cannot be overridden
@@ -899,8 +898,8 @@ class NextjsComponent extends Component {
899
898
forward : {
900
899
cookies : "all" ,
901
900
headers : routesManifest . i18n
902
- ? [ "Accept-Language" , "Authorization" , "Host" ]
903
- : [ "Authorization" , "Host" ] ,
901
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
902
+ : [ "Authorization" , "Host" ] ,
904
903
queryString : true
905
904
} ,
906
905
// lambda@edge key is last and therefore cannot be overridden
@@ -919,8 +918,8 @@ class NextjsComponent extends Component {
919
918
forward : {
920
919
cookies : "all" ,
921
920
headers : routesManifest . i18n
922
- ? [ "Accept-Language" , "Authorization" , "Host" ]
923
- : [ "Authorization" , "Host" ] ,
921
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
922
+ : [ "Authorization" , "Host" ] ,
924
923
queryString : true
925
924
} ,
926
925
// lambda@edge key is last and therefore cannot be overridden
@@ -938,8 +937,8 @@ class NextjsComponent extends Component {
938
937
forward : {
939
938
cookies : "all" ,
940
939
headers : routesManifest . i18n
941
- ? [ "Accept-Language" , "Authorization" , "Host" ]
942
- : [ "Authorization" , "Host" ] ,
940
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
941
+ : [ "Authorization" , "Host" ] ,
943
942
queryString : true
944
943
} ,
945
944
// lambda@edge key is last and therefore cannot be overridden
@@ -958,8 +957,8 @@ class NextjsComponent extends Component {
958
957
forward : {
959
958
cookies : "all" ,
960
959
headers : routesManifest . i18n
961
- ? [ "Accept-Language" , "Authorization" , "Host" ]
962
- : [ "Authorization" , "Host" ] ,
960
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
961
+ : [ "Authorization" , "Host" ] ,
963
962
queryString : true
964
963
} ,
965
964
// lambda@edge key is last and therefore cannot be overridden
@@ -968,7 +967,7 @@ class NextjsComponent extends Component {
968
967
"origin-response" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } `
969
968
}
970
969
} ;
971
-
970
+
972
971
cloudFrontOrigins [ 1 ] . pathPatterns [
973
972
this . pathPattern ( "/support*" , routesManifest )
974
973
] = {
@@ -978,8 +977,8 @@ class NextjsComponent extends Component {
978
977
forward : {
979
978
cookies : "all" ,
980
979
headers : routesManifest . i18n
981
- ? [ "Accept-Language" , "Authorization" , "Host" ]
982
- : [ "Authorization" , "Host" ] ,
980
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
981
+ : [ "Authorization" , "Host" ] ,
983
982
queryString : true
984
983
} ,
985
984
// lambda@edge key is last and therefore cannot be overridden
@@ -998,8 +997,28 @@ class NextjsComponent extends Component {
998
997
forward : {
999
998
cookies : "all" ,
1000
999
headers : routesManifest . i18n
1001
- ? [ "Accept-Language" , "Authorization" , "Host" ]
1002
- : [ "Authorization" , "Host" ] ,
1000
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
1001
+ : [ "Authorization" , "Host" ] ,
1002
+ queryString : true
1003
+ } ,
1004
+ // lambda@edge key is last and therefore cannot be overridden
1005
+ "lambda@edge" : {
1006
+ "origin-request" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } ` ,
1007
+ "origin-response" : `${ defaultEdgeLambdaOutputs . arn } :${ defaultEdgeLambdaPublishOutputs . version } `
1008
+ }
1009
+ } ;
1010
+
1011
+ cloudFrontOrigins [ 1 ] . pathPatterns [
1012
+ this . pathPattern ( "/search*" , routesManifest )
1013
+ ] = {
1014
+ minTTL : 0 ,
1015
+ defaultTTL : 0 ,
1016
+ maxTTL : 86400 ,
1017
+ forward : {
1018
+ cookies : "all" ,
1019
+ headers : routesManifest . i18n
1020
+ ? [ "Accept-Language" , "Authorization" , "Host" ]
1021
+ : [ "Authorization" , "Host" ] ,
1003
1022
queryString : true
1004
1023
} ,
1005
1024
// lambda@edge key is last and therefore cannot be overridden
@@ -1101,7 +1120,7 @@ class NextjsComponent extends Component {
1101
1120
const cloudFrontOutputs = await cloudFront ( {
1102
1121
bucketRegion : bucketRegion ,
1103
1122
distributionId : cloudFrontDistributionId ,
1104
- defaults : {
1123
+ defaults : {
1105
1124
minTTL : 0 ,
1106
1125
defaultTTL : 0 ,
1107
1126
maxTTL : 31536000 ,
0 commit comments