8000 add lp path by john-parker3 · Pull Request #5 · aapcweb/serverless-next.js · GitHub
[go: up one dir, main page]

Skip to content

add lp path #5

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

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/serverless-components/nextjs-component/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,26 @@ class NextjsComponent extends Component {
}
};

cloudFrontOrigins[1].pathPatterns[
this.pathPattern("/lp*", routesManifest)
] = {
minTTL: 0,
defaultTTL: 0,
maxTTL: 86400,
forward: {
cookies: "all",
headers: routesManifest.i18n
? ["Accept-Language", "Authorization", "Host"]
: ["Authorization", "Host"],
queryString: true
},
// lambda@edge key is last and therefore cannot be overridden
"lambda@edge": {
"origin-request": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`,
"origin-response": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`
}
};

// If we are using consolidated API pages (within default lambda), we need to ensure api/* behavior is set correctly.
// Note that if there are no consolidated API pages then existing api/* is not deleted.
// We do so for a couple reasons:
Expand Down
0