private cache to stop cloudflare
This commit is contained in:
parent
f02385986e
commit
278f3ad078
2
index.ts
2
index.ts
@ -39,7 +39,7 @@ app.get('/', (req, res) => {
|
||||
});
|
||||
|
||||
app.get('/cache-me.webp', (_, res) => {
|
||||
res.set('Cache-Control', 'public, max-age=31557600'); // one year
|
||||
res.set('Cache-Control', 'private, max-age=31557600'); // one year
|
||||
visitCount++;
|
||||
res.sendFile(Path.join(import.meta.dir, 'assets', 'webp', 'cache-me.webp'));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user