Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 57fa570

Browse files
authored
add lp path (#5)
1 parent cea73f6 commit 57fa570

File tree

1 file changed

+20
-0
lines changed
  • packages/serverless-components/nextjs-component/src

1 file changed

+20
-0
lines changed

packages/serverless-components/nextjs-component/src/component.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,26 @@ class NextjsComponent extends Component {
989989
}
990990
};
991991

992+
cloudFrontOrigins[1].pathPatterns[
993+
this.pathPattern("/lp*", routesManifest)
994+
] = {
995+
minTTL: 0,
996+
defaultTTL: 0,
997+
maxTTL: 86400,
998+
forward: {
999+
cookies: "all",
1000+
headers: routesManifest.i18n
1001+
? ["Accept-Language", "Authorization", "Host"]
1002+
: ["Authorization", "Host"],
1003+
queryString: true
1004+
},
1005+
// lambda@edge key is last and therefore cannot be overridden
1006+
"lambda@edge": {
1007+
"origin-request": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`,
1008+
"origin-response": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`
1009+
}
1010+
};
1011+
9921012
// If we are using consolidated API pages (within default lambda), we need to ensure api/* behavior is set correctly.
9931013
// Note that if there are no consolidated API pages then existing api/* is not deleted.
9941014
// We do so for a couple reasons:

0 commit comments

Comments
 (0)