[PR #874] [MERGED] Use RealIP middleware #884

Closed
opened 2025-11-20 04:26:25 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qdm12/ddns-updater/pull/874
Author: @erri120
Created: 11/29/2024
Status: Merged
Merged: 12/3/2024
Merged by: @qdm12

Base: masterHead: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 internal/server/handler.go (+1 -0)

📄 Description

Fixes logging issues when running behind a reverse proxy.

From the docs:

RealIP: Sets a http.Request's RemoteAddr to either X-Real-IP or X-Forwarded-For

Without this middleware, running the server behind a reverse proxy will result in every log entry to show the IP address of the proxy instead of the real IP address of the connecting client.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qdm12/ddns-updater/pull/874 **Author:** [@erri120](https://github.com/erri120) **Created:** 11/29/2024 **Status:** ✅ Merged **Merged:** 12/3/2024 **Merged by:** [@qdm12](https://github.com/qdm12) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`0a920e5`](https://github.com/qdm12/ddns-updater/commit/0a920e5b812a868a6730166515eb82498181f2c7) Use `RealIP` middleware ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `internal/server/handler.go` (+1 -0) </details> ### 📄 Description Fixes logging issues when running behind a reverse proxy. From the [docs](https://github.com/go-chi/chi?tab=readme-ov-file#core-middlewares): > RealIP: Sets a http.Request's RemoteAddr to either X-Real-IP or X-Forwarded-For Without this middleware, running the server behind a reverse proxy will result in every log entry to show the IP address of the proxy instead of the real IP address of the connecting client. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:26:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#884