Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Aug 25, 2024
1 parent d6a6bbd commit 8d3b7ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ static void http_request_callback(ws28::HTTPRequest &req,

static const std::string realIp(ws28::HTTPRequest &req) {
std::string ip{req.ip};
req.headers.ForEach([](const std::string_view k, const std::string_view v) {
spdlog::debug("DEBUG {}:{}", k, v);
});
auto value = req.headers.Get("X-Forwarded-For");
if (value.has_value()) {
ip = value.value(); // possible to be multiple comma separated
Expand Down

0 comments on commit 8d3b7ef

Please sign in to comment.