← back to AsSeenInMovies
sitemap.xml: emit Last-Modified header for conditional GET (304)
98f890a267fe6cbe1abecec7ea0be4ee67d9dacb · 2026-05-13 09:25:07 -0700 · SteveStudio2
Files touched
Diff
commit 98f890a267fe6cbe1abecec7ea0be4ee67d9dacb
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 09:25:07 2026 -0700
sitemap.xml: emit Last-Modified header for conditional GET (304)
---
server.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/server.js b/server.js
index 924da67..7da74f2 100644
--- a/server.js
+++ b/server.js
@@ -1929,6 +1929,7 @@ app.get('/sitemap.xml', async (_req, res) => {
const xml = `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n ${urls.join('\n ')}\n</urlset>`;
_sitemapCache = { at: now, xml };
res.setHeader('Cache-Control', 'public, max-age=21600, stale-while-revalidate=86400');
+ res.setHeader('Last-Modified', new Date(now).toUTCString());
res.type('application/xml').send(xml);
} catch (e) {
res.status(500).type('text/plain').send(`error: ${e.message}`);
← e25dd59 asim /api/credits/stats — document why department=0 (TMDB in
·
back to AsSeenInMovies
·
sitemap.txt: emit Last-Modified header for conditional GET ( 0f94cb4 →