-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Update nginx recommendations #26924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update nginx recommendations #26924
Conversation
I guess |
This really depends on the situation, I would keep both. Generally nowadays there will be at least two proxies when deploying HA in K8s/docker etc edge reverse proxy -> ingress reverse proxy -> gitea and if not correctly configured x-real-ip could be incorrect and x-forwarded-for will be more reliable in that case. In the case of a single VM and nginx in front, yes it does not really matter what to use |
For more general use case I would recommend leaving them both |
I guess I will restore x-real-ip based on your opinion. Generally I think XFF is much better and likely better handled in a chain of proxies. There is also a https://datatracker.ietf.org/doc/html/rfc7239 but it seems no one is adopting it 😆 |
So now this is only about websocket config, which does not hurt to have and will be needed for #26679 anyways, so I think it's good to start recommending it. |
In many cases, |
That's why there is configuration on how many last IP's from |
I was unable to create a backport for 1.20. @silverwind, please send one manually. 🍵
|
Not worth the backport imho, Websocket will come in 1.22 earliest. |
* giteaofficial/main: Fix schedule actions still running even if workflow disalbed (go-gitea#26939) Fix the missing repo count (go-gitea#26942) Improve SSH Key / GPG Key / Deploy Key UI (go-gitea#26949) [skip ci] Updated translations via Crowdin Update nginx recommendations (go-gitea#26924) docs: Update Profile README information (go-gitea#26947) Fix scoped label layout (go-gitea#26932) Move createrepository from module to service layer (go-gitea#26927) Add a documentation note for Windows Service (go-gitea#26938) allow "latest" to be used in release vTag when downloading file (go-gitea#26748) Extract common code to new template (go-gitea#26933) Show always repo count in header (go-gitea#26842) Show always repo count in header (go-gitea#26842) Artifacts retention and auto clean up (go-gitea#26131) Fix UI anomalies (go-gitea#26929) Fix the display of org level badges (go-gitea#26504)
Connection
andUpgrade
needed for websocketsX-Real-IP
unnecessary and duplicate withX-Forwarded-For
. chi checks both headers, but XFF is definitely the more "standard" one.