feat: retrieve client IP from header in config.toml
If the config.toml has defined a HTTP header to look for a remote IP, that will be logged. Otherwise, the socket address IP will be used. closes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/47
This commit is contained in:
@@ -46,6 +46,11 @@ address = "0.0.0.0"
|
||||
# Listen on this port
|
||||
port = 8080
|
||||
|
||||
# If present, read this HTTP header for logging client IP addresses.
|
||||
# Examples for common proxies, cloudflare:
|
||||
#remote_ip_header = "x-forwarded-for"
|
||||
#remote_ip_header = "cf-connecting-ip"
|
||||
|
||||
[options]
|
||||
# Reject events that have timestamps greater than this many seconds in
|
||||
# the future. Recommended to reject anything greater than 30 minutes
|
||||
|
||||
Reference in New Issue
Block a user