fix: 404 handling for static assets

This commit is contained in:
Pooya Parsa 2021-01-20 16:42:42 +01:00
parent fd0be27f0c
commit 387fa4a278

View File

@ -29,7 +29,7 @@ export default async function serveStatic(req, res) {
if (!asset) {
if (id.startsWith(PUBLIC_PATH)) {
throw createError({
message: 'Asset not found: ' + id,
statusMessage: 'Cannot find static asset ' + id,
statusCode: 404
})
}