← back to Stars of Design
sod sitemap.xml + .txt Cache-Control 1h→6h + SWR 24h (mirrors asim). 54/54.
6d21b22779595711b4da1d8eb21777f2316186c9 · 2026-05-13 08:50:14 -0700 · Steve Abrams
Files touched
Diff
commit 6d21b22779595711b4da1d8eb21777f2316186c9
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed May 13 08:50:14 2026 -0700
sod sitemap.xml + .txt Cache-Control 1h→6h + SWR 24h (mirrors asim). 54/54.
---
routes/public.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/routes/public.js b/routes/public.js
index 626316e..c5e3144 100644
--- a/routes/public.js
+++ b/routes/public.js
@@ -571,7 +571,7 @@ router.get('/sitemap.xml', async (req, res, next) => {
` <url><loc>${u.loc}</loc><lastmod>${today}</lastmod><changefreq>${u.changefreq}</changefreq><priority>${u.priority}</priority></url>`
).join('\n') +
'\n</urlset>\n';
- res.setHeader('Cache-Control', 'public, max-age=3600');
+ res.setHeader('Cache-Control', 'public, max-age=21600, stale-while-revalidate=86400');
res.type('application/xml').send(xml);
} catch (e) { next(e); }
});
@@ -602,7 +602,7 @@ router.get('/sitemap.txt', async (req, res, next) => {
...firms.map((f) => `${base}/firms/${f.slug}`),
...clients.map((c) => `${base}/clients/${c.slug}`),
];
- res.setHeader('Cache-Control', 'public, max-age=3600');
+ res.setHeader('Cache-Control', 'public, max-age=21600, stale-while-revalidate=86400');
res.type('text/plain').send(urls.join('\n') + '\n');
} catch (e) { next(e); }
});
← c0ba760 sod /api discovery — list /api/health + smoke +2 /api/health
·
back to Stars of Design
·
sod Makefile — common dev targets (mirrors asim) a808c8d →