Skip to content

Fix dynamic lastmod in sitemap.xml.ts - #2

Closed
toprakdevx wants to merge 2 commits into
GaleMC:mainfrom
toprakdevx:fix/sitemap-lastmod
Closed

Fix dynamic lastmod in sitemap.xml.ts#2
toprakdevx wants to merge 2 commits into
GaleMC:mainfrom
toprakdevx:fix/sitemap-lastmod

Conversation

@toprakdevx

Copy link
Copy Markdown

sitemap.xml.ts was generating a new timestamp on every request. This caused search engines to re-crawl unnecessarily.

Added getLastmod() helper that returns a stable date. Supports SITEMAP_LASTMOD env var override. Also added Cache-Control header to the response.

@toprakdevx toprakdevx closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant