Skip to content

Commit

Permalink
fix(static): remove cache-control headers when asset is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 8, 2023
1 parent 8dde296 commit e3d57fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e3d57fc

Please sign in to comment.