Skip to content

Is there a way we can see/log the actual forward proxy request's details? #2205

Answered by MihaZupan
ChintanRaval asked this question in Q&A
Discussion options

You must be logged in to vote

What information about the request are you looking to log?
Things like Uri/Host/Headers, or also the request body of POST requests?

There is nothing similar to UseHttpLogging built in, but most of the information on the outgoing request should be very similar to the original request that came in (minus Uri and header modifications done with transforms).

However, this seems to require moving away from the regular app.MapReverseProxy() call, is there a way one can log/see/access the forward request object without using direct forwarding?

You don't have to write a whole HttpTransformer or move to direct forwarding to do so.
E.g.

services.AddReverseProxy()
    .AddTransforms(transformBuilde…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ChintanRaval
Comment options

Answer selected by ChintanRaval
Comment options

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

@jakebanks
Comment options

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