Skip to content

Commit

Permalink
docs: update link to headers since line position changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongitmail committed Jun 30, 2024
1 parent 2234bfe commit 59b1056
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
- 👻 Exclude specific routes or patterns using regex patterns (e.g.
`^/dashboard.*`, paginated URLs, etc).
- 🚀 Defaults to 1h CDN cache, no browser cache.
- 💆 Set custom headers to override [default headers](https://github.com/jasongitmail/super-sitemap/blob/main/src/lib/sitemap.ts#L84-L85):
`sitemap.response({ headers: {'cache-control: '...'}, ...})`.
- 💆 Set custom headers to override [default headers](https://github.com/jasongitmail/super-sitemap/blob/main/src/lib/sitemap.ts#L142):
`sitemap.response({ headers: {'cache-control: 'max-age=0, s-maxage=60'}, ...})`.
- 🫡 Uses [SvelteKit's recommended sitemap XML
structure](https://kit.svelte.dev/docs/seo#manual-setup-sitemaps).
- 💡 Google, and other modern search engines, [ignore `priority` and
Expand Down
2 changes: 1 addition & 1 deletion src/lib/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export async function response({
body = generateBody(origin, new Set(pathsSubset), changefreq, priority);
}

// Merge keys case-insensitive
// Merge keys case-insensitive; custom headers take precedence over defaults.
const _headers = {
'cache-control': 'max-age=0, s-maxage=3600', // 1h CDN cache
'content-type': 'application/xml',
Expand Down

0 comments on commit 59b1056

Please sign in to comment.