Skip to content

v5: Middleware not working with Route.resource #1469

Answered by thetutlage
mayureshnw asked this question in Help
Discussion options

You must be logged in to vote

A resource generates a total of 7 routes, you have to tell on which route to apply the middleware.

If it's all the routes. Then simply use the * keyword.

Route.resource().middleware({ '*': 'auth' })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@farshadfahimi
Comment options

Answer selected by mayureshnw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants