简体   繁体   中英

how to add RedirectStrategy to Apache HttpComponents NHttpReverseProxy

I want to enable redirection in the HttpComponents NHttpReverseProxy example. To me, it seems the logical place would be to implement a Http Protocol Processor , but I haven't found one that I can implement or extend. I have seen the stack overflow question here that discusses a parameter that handles automatic redirect handling, but that link is broken. I also looked at an example on github , but I'm not sure how to incorporate that code into the Reverse Proxy example.

NHttpReverseProxy represents an extremely basic implementation of a reverse proxy with all non-essential bits omitted mainly intended to demonstrate efficient handling of inbound and outbound message streams using an event-driven non-blocking i/o model. For more complex scenarios one could use Apache HttpAsyncClient to execute outbound requests, which would automatically handle redirects

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM