Skip to content
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

Shop page entry #2610

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
add sitemaps path (#2)
  • Loading branch information
john-parker3 authored Mar 16, 2023
commit 1cbaa02103b22166248d8a4045d1e78bd19809c9
19 changes: 19 additions & 0 deletions packages/serverless-components/nextjs-component/src/component.ts
Original file line number Diff line number Diff line change
@@ -909,6 +909,25 @@ class NextjsComponent extends Component {
"origin-response": `${defaultEdgeLambdaOutputs.arn}:${defaultEdgeLambdaPublishOutputs.version}`
}
};
cloudFrontOrigins[1].pathPatterns[
this.pathPattern("/sitemaps*", 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}`
}
};

cloudFrontOrigins[1].pathPatterns[
this.pathPattern("/training-and-events*", routesManifest)