From e3d57fc4f3d46f15b3f939ddf4142c45280fc217 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 9 Feb 2023 00:05:02 +0100 Subject: [PATCH] fix(static): remove `cache-control` headers when asset is not found --- src/runtime/static.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/static.ts b/src/runtime/static.ts index 2672f25a15..9ae48a1bcc 100644 --- a/src/runtime/static.ts +++ b/src/runtime/static.ts @@ -50,6 +50,7 @@ export default eventHandler((event) => { if (!asset) { if (isPublicAssetURL(id)) { + event.node.res.removeHeader("cache-control"); throw createError({ statusMessage: "Cannot find static asset " + id, statusCode: 404,