Need to run server code on each route change without using middleware
Unanswered
Harlequin posted this in #help-forum
HarlequinOP
My project isn't using edge so I need to be able to run an auth check on each route without using middleware. Obviously I can just manually check on each route, but I thought template would work? Apparently template doesn't run on each route change either though.
2 Replies
@Harlequin My project isn't using edge so I need to be able to run an auth check on each route without using middleware. Obviously I can just manually check on each route, but I thought template would work? Apparently template doesn't run on each route change either though.
Saint Hubert Jura Hound
Why cant you use middleware?
personally i just made a "authcheck" function that i put on all my pages and it works good enough (i hope i havent forgotten about any places)