Static GitHub Issues

[2367] Middleware on first load in static pages

prev: [Question] Nuxt Commands
next: Disable Code Splitting in Nuxt Config

Middleware can depend on query string. Middleware runs once per navigation, wherever. This works wonderfully for first SSR load from a living server. However, when generating pages, query is always {}. So, when a static page is accessed with a query string (from another site, bookmarks, chat) the resulting page is as if there was no query string, since the middleware is pre-executed only. Hence, middleware depending on query is broken on static load. What should we do?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2061">#c2061</a>)</em></sub></div>