Skip to content

Commit

Permalink
http1: Host IP is actually a peer()'s IP
Browse files Browse the repository at this point in the history
  • Loading branch information
astibal committed Apr 11, 2024
1 parent d106603 commit 76b4923
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/inspect/engine/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ namespace sx::engine::http {

// no point to continue
if(ix_host == std::string::npos) {
app_request->http_data.host = ctx.origin->host();
if(ctx.origin and ctx.origin->peer())
app_request->http_data.host = ctx.origin->peer()->host();
return false;
};

Expand Down Expand Up @@ -101,7 +102,8 @@ namespace sx::engine::http {
return true;
}
else {
app_request->http_data.host = ctx.origin->host();
if(ctx.origin and ctx.origin->peer())
app_request->http_data.host = ctx.origin->peer()->host();
}

return false;
Expand Down

0 comments on commit 76b4923

Please sign in to comment.