adonuxt-template
adonuxt-template copied to clipboard
Middleware is being executed for static files
There are several middleware in config which is running on every request including nuxt bundles and images (can be ~50-100 per page)
const globalMiddleware = [
'Adonis/Middleware/Cors',
'Adonis/Middleware/BodyParser',
'Adonis/Middleware/Shield',
'Adonis/Middleware/Flash',
'Adonis/Middleware/AuthInit'
]
Adonis has support for serving static files (by default from /public folder) but Nuxt doesn't seem to produce static files on disk anywhere in dev mode to be able to configure Adonis to serve static files from there.
you can configure nginx to point all images,css etc in /_nuxt/ to go to resources/_nuxt/ this way those assets will never be handled served adonis/nuxt. Let me know if you get this too work, if not i can do a test