You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a issue on which my Rocket application needs some sort of guard for all routes and I don't find anywhere on documentation to do it.
I've tested doing a Fairing that then calls a guard with request.guard method, but I still don't know how to process the outcome the guard produces, how to abort the request on that Fairing.
Is there any way to achieve this?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
I've tested doing a Fairing that then calls a guard with request.guard method, but I still don't know how to process the outcome the guard produces, how to abort the request on that Fairing.
Fairings cannot directly influence routing or respond early. #749 includes a proposal that would make Fairings able to return a Response or Responder directly, but it hasn't yet been implemented.
Is there any way to achieve this?
One current workaround is that an on_request fairing can change the request URI (with set_uri) to a particular predefined route.
I've run into a issue on which my Rocket application needs some sort of guard for all routes and I don't find anywhere on documentation to do it.
I've tested doing a Fairing that then calls a guard with
request.guard
method, but I still don't know how to process the outcome the guard produces, how to abort the request on that Fairing.Is there any way to achieve this?
Thank you in advance.
The text was updated successfully, but these errors were encountered: