Skip to content

Added X-Real-Ip usage for logging#24

Merged
douxxtech merged 7 commits intomainfrom
x-real-ip
Mar 25, 2026
Merged

Added X-Real-Ip usage for logging#24
douxxtech merged 7 commits intomainfrom
x-real-ip

Conversation

@douxxtech
Copy link
Owner

This PR adds the USE_X_REAL_IP=<true|false> key to the configuration file. If set to true, the server will use the X-Real-Ip header to display the IP in logs, e.g. for reverse proxy setups. There is NO validation of the header, so be sure to retrieve it from a trusted source.

@github-actions
Copy link

START + GET /: 155 syscalls
Fastest: 0.000016s (close)
Slowest: 0.837108s (accept)
threads: 4 (auto), conns: 50, duration: 20s

[wrk]
Running 20s test @ http://127.0.0.1:8080/
  4 threads and 50 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.15ms    8.63ms 213.71ms   99.52%
    Req/Sec     1.60k   309.92     2.39k    67.38%
  127414 requests in 20.04s, 195.03MB read
  Socket errors: connect 0, read 166, write 0, timeout 0
Requests/sec:   6357.31
Transfer/sec:      9.73MB

@douxxtech douxxtech merged commit 86e6936 into main Mar 25, 2026
2 checks passed
@douxxtech douxxtech deleted the x-real-ip branch March 25, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant