Skip to content

Commit

Permalink
Update coro_http_reverse_proxy.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
helintongh committed Feb 18, 2024
1 parent b996ee4 commit 8f9c82a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/cinatra/coro_http_reverse_proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,14 @@ class reverse_proxy {
}

template <http_method... method, typename... Aspects>
void start_http_proxy(std::string url_path, bool sync = true,
Aspects &&...aspects) {
void start_http_proxy(bool sync = true, Aspects &&...aspects) {
server_.set_http_proxy_router();
server_.set_http_handler<method...>(
"/",
[this](coro_http_request &req,
coro_http_response &response) -> async_simple::coro::Lazy<void> {
// coroutine in other thread.
coro_http_client client{};
std::cout << req.get_url() << std::endl;
co_await proxy_reply(client, std::string(req.get_url()), req,
response);
},
Expand Down

0 comments on commit 8f9c82a

Please sign in to comment.