diff --git a/server/middleware/cache-control.js b/server/middleware/headers.js similarity index 64% rename from server/middleware/cache-control.js rename to server/middleware/headers.js index e3e4ca824a..15b87d8e6d 100644 --- a/server/middleware/cache-control.js +++ b/server/middleware/headers.js @@ -1,8 +1,9 @@ -import { useCDNHeaders } from '#nuxt-multi-cache/composables' - export default defineEventHandler((event) => { const url = event.node.req.url; + event.node.res.setHeader("X-Frame-Options", "DENY"); + event.node.res.setHeader("X-Content-Type-Options", "nosniff"); + if (url.startsWith("/api/_content/")) { event.node.res.setHeader("Cache-Control", "public, max-age=604800, immutable"); }