Nuxt Middlewares
up:: Nuxt ⚐
Summary
Middlewares allow functions to run in between route changes.
In the file name, you can specify where you want to run this. Either global with <name>.global.js
. Or with specifying it in definePageMeta
.
Authentification example
middleware/auth.global.js