image caching optimized
This commit is contained in:
@@ -16,6 +16,11 @@ async function bootstrap() {
|
||||
//app.use('/bizmatch/payment/webhook', bodyParser.raw({ type: 'application/json' }));
|
||||
// Serve static files from pictures directory
|
||||
app.use('/pictures', express.static(PICTURES_DIR));
|
||||
// Prevent browsers from caching 404s on /pictures/*
|
||||
app.use('/pictures', (_req, res) => {
|
||||
res.set('Cache-Control', 'no-store');
|
||||
res.status(404).end();
|
||||
});
|
||||
|
||||
app.setGlobalPrefix('bizmatch');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user