This repository was archived by the owner on Dec 12, 2023. It is now read-only.
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
Ensure that session middleware is always first #44
Open
Description
Describe the feature
Currently, we attempt to ensure that the server session middleware is always first by using .unshit
to register it:
Lines 80 to 86 in f82d2c1
This attempt however does not work, as noticed by discord user Bark: https://discord.com/channels/1024643779711483944/1024705710455533598/1045816936359010326
With further investigation this does not work, as the module setup runs at "build time" before the user nuxt app, so at that point any user middlewares are not in the middleware array yet, so unshift
ing does not have any effect.
Goal:
- always register session middleware first
- with reasonable precision
- optional: allow user to set order (this could be helpful with other modules that should come before / after this session middleware)
Additional information
No response