mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-03 22:45:19 +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 (!asset) {
|
||||||
if (id.startsWith(PUBLIC_PATH)) {
|
if (id.startsWith(PUBLIC_PATH)) {
|
||||||
throw createError({
|
throw createError({
|
||||||
message: 'Asset not found: ' + id,
|
statusMessage: 'Cannot find static asset ' + id,
|
||||||
statusCode: 404
|
statusCode: 404
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user