🐛 Bug Report: IP addresses not recorded when running on Unix domain socket #610

Closed
opened 2026-02-04 20:39:05 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @mk12 on GitHub (Jan 17, 2026).

Reproduction steps

Run Pocket ID with UNIX_SOCKET=/path/to/pocket-id.sock and TRUST_PROXY=true.

Expected behavior

It should record the client IP addresses from X-Forwarded-For headers.

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

Originally created by @mk12 on GitHub (Jan 17, 2026). ### Reproduction steps Run Pocket ID with `UNIX_SOCKET=/path/to/pocket-id.sock` and `TRUST_PROXY=true`. ### Expected behavior It should record the client IP addresses from `X-Forwarded-For` headers. ### 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_
Author
Owner

@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): Ok looks like this is more a Gin issue: https://github.com/gin-gonic/gin/issues/2718
Author
Owner

@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 to X-Forwarded-For should work.

@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 to `X-Forwarded-For` should work.
Author
Owner

@appleboy commented on GitHub (Jan 18, 2026):

@mk12 I will take a look.

@appleboy commented on GitHub (Jan 18, 2026): @mk12 I will take a look.
Author
Owner

@appleboy commented on GitHub (Jan 18, 2026):

https://github.com/gin-gonic/gin/pull/3359 already merged.

@appleboy commented on GitHub (Jan 18, 2026): https://github.com/gin-gonic/gin/pull/3359 already merged.
Author
Owner

@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.

@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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#610