mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: 404 handling for static assets
This commit is contained in:
parent
fd0be27f0c
commit
387fa4a278
@ -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
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user