Skip to content

Send http status from middleware to react router #59

Answered by rphlmr
jezikk asked this question in Q&A
Discussion options

You must be logged in to vote

I should test to be sure but I would try a middleware, before every other middleware.

It would await next() and then check if the c.res.status is 403 and then redirect to /403.
It will then re enter and hit the rr middleware.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rphlmr
Comment options

@jezikk
Comment options

Answer selected by jezikk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants