[object Object]

← back to Stars of Design

sitemap.xml: emit Last-Modified header for conditional GET (asim parity)

d54a25784a84c05936a9e471f887beab2a314333 · 2026-05-13 09:25:22 -0700 · Steve Abrams

Files touched

Diff

commit d54a25784a84c05936a9e471f887beab2a314333
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed May 13 09:25:22 2026 -0700

    sitemap.xml: emit Last-Modified header for conditional GET (asim parity)
---
 routes/public.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/routes/public.js b/routes/public.js
index c5e3144..8d93fb1 100644
--- a/routes/public.js
+++ b/routes/public.js
@@ -572,6 +572,7 @@ router.get('/sitemap.xml', async (req, res, next) => {
       ).join('\n') +
       '\n</urlset>\n';
     res.setHeader('Cache-Control', 'public, max-age=21600, stale-while-revalidate=86400');
+    res.setHeader('Last-Modified', new Date().toUTCString());
     res.type('application/xml').send(xml);
   } catch (e) { next(e); }
 });

← fe83a3f sod robots.txt: also reference /sitemap.txt. 54/54.  ·  back to Stars of Design  ·  API: add /api/designers/random + /api/firms/random + /api/cl ba5954a →