~netlandish/links-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH links] Correct IP extraction logic for api server.

Details
Message ID
<20250320185647.21292-1-peter@netlandish.com>
Sender timestamp
1742475402
DKIM signature
missing
Download raw message
Patch: +2 -2
Changelog-fixed: IP detection for api server under nginx reverse proxy.
Signed-off-by: Peter Sanchez <peter@netlandish.com>
---
 cmd/api/main.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/api/main.go b/cmd/api/main.go
index c9f0a7b..5546df4 100644
--- a/cmd/api/main.go
+++ b/cmd/api/main.go
@@ -104,8 +104,8 @@ func run() error {

	e := echo.New()
	// https://echo.labstack.com/docs/ip-address
	// Deployed via Caddy at the moment which uses X-Forwarded-For header by default
	e.IPExtractor = echo.ExtractIPFromXFFHeader()
	// nginx default instead of Caddy default.
	e.IPExtractor = echo.ExtractIPFromRealIPHeader()

	// email work queue and service, general task queue
	eq := email.NewQueue(eSize)
-- 
2.47.2
Details
Message ID
<D8LBRW35JB10.2JL97PSIVAREX@netlandish.com>
In-Reply-To
<20250320185647.21292-1-peter@netlandish.com> (view parent)
Sender timestamp
1742475794
DKIM signature
missing
Download raw message
Applied.

To git@git.code.netlandish.com:~netlandish/links
   536b6d2..b614e0a  master -> master
Reply to thread Export thread (mbox)