Skip to content

Commit

Permalink
Improve proxy connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Nov 22, 2023
1 parent addd3bc commit 5245179
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proxy/include/proxy/proxy_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,12 @@ R"x*x(<html>
else
req.target(std::string(url.path()) + query);

req.set(http::field::host, url.host());

if (req.find(http::field::connection) == req.end() &&
req.find(http::field::proxy_connection) != req.end())
req.set(http::field::connection, req[http::field::proxy_connection]);

req.erase(http::field::proxy_authorization);
req.erase(http::field::proxy_connection);

Expand Down

0 comments on commit 5245179

Please sign in to comment.