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

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update component.ts
Browse files Browse the repository at this point in the history
raghukalia authored Jun 26, 2024

Verified

This commit was signed with the committer’s verified signature.
erikmd Erik Martin-Dorel
1 parent d31c36f commit 84bdc5e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion packages/serverless-components/nextjs-component/src/component.ts
Original file line number Diff line number Diff line change
@@ -1046,7 +1046,7 @@ class NextjsComponent extends Component {
"origin-response": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`
}
};
cloudFrontOrigins[1].pathPatterns[
cloudFrontOrigins[1].pathPatterns[

Check notice on line 1049 in packages/serverless-components/nextjs-component/src/component.ts

Codacy Production / Codacy Static Code Analysis

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

Replace `↹` with `··`
this.pathPattern("/shop", routesManifest)
] = {
minTTL: 0,
@@ -1065,6 +1065,25 @@ class NextjsComponent extends Component {
"origin-response": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`
}
};
cloudFrontOrigins[1].pathPatterns[
this.pathPattern("/software-and-services*", 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.

0 comments on commit 84bdc5e

Please sign in to comment.