mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-06 12:57:48 +00:00
fix: rely on svelte's default cache settings
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* @returns {import('express').RequestHandler}
|
||||
*/
|
||||
export function cache() {
|
||||
return function (_req, res, next) {
|
||||
res.setHeader('Cache-Control', 'max-age=3600, no-cache');
|
||||
next();
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
import express from 'express';
|
||||
import compression from 'compression'
|
||||
import { cache } from './cache.js';
|
||||
import { sitemap } from './sitemap.js'
|
||||
import { handler } from '../build/handler.js';
|
||||
|
||||
async function main() {
|
||||
const app = express();
|
||||
app.use(cache());
|
||||
app.use(compression());
|
||||
app.use(await sitemap());
|
||||
app.use(handler);
|
||||
|
||||
Reference in New Issue
Block a user