mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[PR #1252] [MERGED] Adding proxy client IP header override functionality #1549
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1549
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/1252
Author: @pixitha
Created: 1/6/2025
Status: ✅ Merged
Merged: 6/1/2025
Merged by: @binwiederhier
Base:
main← Head:main📝 Commits (5)
926967badding logic to specifcy client-ip header from proxy20c014bAdding test and some docs0e6a483fixing auto-format change0aee625fixing auto-format changea49cafbmore correcting auto-formats📊 Changes
7 files changed (+69 additions, -216 deletions)
View changed files
📝
cmd/serve.go(+3 -0)📝
docs/config.md(+2 -1)📝
go.sum(+4 -198)📝
server/config.go(+2 -0)📝
server/server.go(+2 -2)📝
server/server_test.go(+13 -0)📝
server/util.go(+43 -15)📄 Description
Based on this #905, I added the ability to specify the header for the proxy server to send the real client IP, if you don't want to use XFF header.
Was able to test and build and deploy this to fly.io and it now correctly identifies the client ip.
Still need to refactor it a bit more I think, maybe add the option to specify the subnet for the proxy server for still using XFF with a bit more logic?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.