mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-07-16 05:54:01 +03:00
🐛 Bug Report: IP addresses not recorded when running on Unix domain socket #610
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mk12 on GitHub (Jan 17, 2026).
Reproduction steps
Run Pocket ID with
UNIX_SOCKET=/path/to/pocket-id.sockandTRUST_PROXY=true.Expected behavior
It should record the client IP addresses from
X-Forwarded-Forheaders.Actual Behavior
All the IP addresses in the audit log are blank.
Pocket ID Version
2.2.0
Database
sqlite3
OS and Environment
Debian 13.3, caddy 2.10.2
Log Output
No response
@mk12 commented on GitHub (Jan 17, 2026):
Ok looks like this is more a Gin issue: https://github.com/gin-gonic/gin/issues/2718
@mk12 commented on GitHub (Jan 17, 2026):
And it was fixed 3 years ago but they never merged it 😢 https://github.com/gin-gonic/gin/pull/3359
There is a workaround of
gin.SetTrustedPlatform("X-Some-Header")to make it use whatever header you want. So if Pocket ID could read an environment variable to set that, that would work. For cases like mine where Caddy is the only thing in front, even setting it toX-Forwarded-Forshould work.@appleboy commented on GitHub (Jan 18, 2026):
@mk12 I will take a look.
@appleboy commented on GitHub (Jan 18, 2026):
https://github.com/gin-gonic/gin/pull/3359 already merged.
@stonith404 commented on GitHub (Jan 24, 2026):
Cool, thanks for bringing this to attention. I'm closing this issue because this will get fixed as soon as the new Gin version gets released.