-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strip the prefix from ipv4-mapped addresses #73
base: master
Are you sure you want to change the base?
Conversation
This is cool! I think it's a good idea, but I feel like some test cases for it might be a good idea. I'm also not 100% sure that it's safe under all circumstances. At first glance it certainly looks fine, though. Just my two cents. |
I could not come up with a situation that could cause trouble... But yes, looks too easy to be real. 😜 |
Could you please give me an example of how this looks? I guess in the access log? |
ffcc08e
to
c1dcc8a
Compare
Yes, this is for access log. Before:
After:
|
e3c12c4
to
0793a4b
Compare
Updated again... There's a macro |
ac48ad1
to
9e5738c
Compare
... to use it again later.
This allows to have plain IPv4 addresses in log, even if listening on an IPv6 socket. Before: ::ffff:10.7.7.72 - - [24/Jan/2025:22:15:54 +0100] "GET /archive.tar.zst HTTP/1.1" 200 72194 "" "pacredir/0.4.8 (arch/x86_64)" After: 10.7.7.72 - - [24/Jan/2025:22:15:54 +0100] "GET /archive.tar.zst HTTP/1.1" 200 72194 "" "pacredir/0.4.8 (arch/x86_64)"
9e5738c
to
81badcb
Compare
This allows to have plain IPv4 addresses in log, even if listening on an IPv6 socket.