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
Is your feature request related to a problem? Please describe.
Request modifiers can only inspect and modify requests
Why limiting to that? I have a case where need to short circuit with some logic, but only after KrakenD auth/validator runs. This can be done in plugin/http-client but don't want to touch plugin/http-client. I can't do it in plugin/http-server since it runs before auth/validator. So the perfect place is to Request Modifiers, implement some logic there and if needed short circuit by returning ResponseWrapper (you can simulate this by returning error but can't sending headers in this case, also the logs will show errors too which not desireable).
Describe the solution you'd like
Propose to allow Request Modifiers to return ResponseWrapper to indicating it is a shortcircuit, the Request Modifiers will act like Response Modifiers in this case. These are the characteristic that follows:
If Request Modifiers returning ResponseWrapper, stop the request modifiers executor and return the modified request and the response.
If Response Modifiers exists, execute the response modifiers using the above response.
The text was updated successfully, but these errors were encountered:
minizilla
changed the title
Enable Request Modifiers to short circuit without error
Enable Request Modifiers to short circuit and returning ResponseWrapper
Aug 26, 2024
Is your feature request related to a problem? Please describe.
Why limiting to that? I have a case where need to short circuit with some logic, but only after KrakenD
auth/validator
runs. This can be done inplugin/http-client
but don't want to touchplugin/http-client
. I can't do it inplugin/http-server
since it runs beforeauth/validator
. So the perfect place is to Request Modifiers, implement some logic there and if needed short circuit by returningResponseWrapper
(you can simulate this by returning error but can't sending headers in this case, also the logs will show errors too which not desireable).Describe the solution you'd like
Propose to allow Request Modifiers to return
ResponseWrapper
to indicating it is a shortcircuit, the Request Modifiers will act like Response Modifiers in this case. These are the characteristic that follows:ResponseWrapper
, stop the request modifiers executor and return the modified request and the response.The text was updated successfully, but these errors were encountered: