Serve the old site's /images/ banner files: Network Ad Space ads still hotlink them (ad 236 showed a broken banner on startworkingforyou.com, Marty 2026-11-19)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -261,7 +261,7 @@ const server = http.createServer(async (req, res) => {
|
||||
return res.end('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + urls + '</urlset>');
|
||||
}
|
||||
if (p === '/robots.txt') { res.writeHead(200, headers({ 'Content-Type': 'text/plain; charset=utf-8' })); return res.end('User-agent: *\nAllow: /\nDisallow: /my\nDisallow: /admin\nDisallow: /api/\nDisallow: /go/\nDisallow: /sso/\n\nSitemap: https://' + C.site + '/sitemap.xml\n'); }
|
||||
if (p.startsWith('/assets/') || p.startsWith('/art/') || p === '/favicon.ico') {
|
||||
if (p.startsWith('/assets/') || p.startsWith('/art/') || p.startsWith('/images/') || p === '/favicon.ico') { // /images/ = the old site's banner files, still hotlinked by Network Ad Space ads (2026-11-19)
|
||||
const f = path.normalize(path.join(PUB, p === '/favicon.ico' ? '/art/icon-192.png' : p)); if (!f.startsWith(PUB + path.sep)) { res.writeHead(400); return res.end(); }
|
||||
if (/\.(mp4|webm)$/i.test(f)) return sendMedia(req, res, f);
|
||||
return sendFile(res, f);
|
||||
|
||||
Reference in New Issue
Block a user