Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the closest equivalent in Nuxt 3 to an "Anonymous Middleware" from Nuxt 2?

I am learning about Nuxt 3 at the moment and currently focus on things that I knew how to handle in Nuxt 2 and for which I did not yet find a (similar, simple) solution in Nuxt 3.

One of those things are anonymous middlewares. How can I build those in Nuxt 3 / what is the closest thing in Nuxt 3 that can be used to get the same functionallity? Do I really have to call an API endpoint? This seems so overkill compared to Nuxt 2.

like image 228
Markus Weninger Avatar asked Oct 28 '25 05:10

Markus Weninger


1 Answers

This discussion may be helpful to track the status of the question.
The latest and most useful place where you can get the up-to date info is here.

TLDR: no client-side middleware as of today but you can have workarounds.

like image 99
kissu Avatar answered Oct 31 '25 04:10

kissu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!