Closed jorge-ribeiro closed 1 week ago
Hi Jorge! Why did you create issue when you need just create Q&A discussion to ask your questions?
Sorry... can you send me the link to Q&A? thanks!
On Thu, 4 Jul 2024 at 19:25, Raman Maksimchuk @.***> wrote:
Hi Jorge! Why did you create issue when you need just create Q&A discussion to ask your questions?
— Reply to this email directly, view it on GitHub https://github.com/ThreeMammals/Ocelot/issues/2115#issuecomment-2209436465, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJU7SQGYQD2LL6VCOJYLH5LZKWHSHAVCNFSM6AAAAABKLQXPPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGQZTMNBWGU . You are receiving this because you authored the thread.Message ID: @.***>
I have an ocelot web api solution in which requests must be checked by a captchamiddleware to verify if they have the proper custom captcha key/value in a request header, before the request is forwarded to business entities webapis. When captcha is not present or invalid an error response is sent back. I also have to be able to get the selected downstream route in order to get some metadata from ocelot.json.
The thing is when i add my middleware like:
the response is sent back nicely but i cannot access route info, and when i add my middleware like:
i have access to route info, but cannot change response as it already started (it sends the response anyway but with an ugly warning - ReasonPhrase cannot be set because the response has already started).
Is this even possible to do with Ocelot? If so can you help me here?
Thanks
Regards