Skip to content

how to stop sending the request after checking for a some condition in AddRequestTransform and send a response (non proxied custom) #907

Answered by Tratcher
dotsource asked this question in Q&A
Discussion options

You must be logged in to vote

Transforms can't stop the request from being sent, try using middleware for that instead:
https://github.com/microsoft/reverse-proxy/blob/main/docs/docfx/articles/middleware.md#send-an-immediate-response

Out of curiosity, what kind of condition are you checking for, and what's the alternate response you send?

Replies: 1 comment 2 replies

Comment options

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

@Tratcher
Comment options

Answer selected by karelz
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