Skip to content

Add full IP chain for getting real IP of user in the element UI. - #24

Merged
realtyem merged 7 commits into
realtyem:masterfrom
TafkaMax:add-real-ip-to-workers-nginx-config
Feb 14, 2026
Merged

Add full IP chain for getting real IP of user in the element UI.#24
realtyem merged 7 commits into
realtyem:masterfrom
TafkaMax:add-real-ip-to-workers-nginx-config

Conversation

@TafkaMax

@TafkaMax TafkaMax commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Hi, haven't done a PR in a while. I've noticed that the IP users see in element does not match their computer IP.

https://paigekim29.medium.com/understanding-x-forwarded-for-header-settings-in-nginx-4929f49d57dd

Instead of using $remote_addr which is the last known address, which might usually be from a proxy, I changed it to use the full chain instead.


I also added the option to use the synapse version that is defined in the arg SYNAPSE_VERSION

@realtyem

realtyem commented Feb 8, 2026

Copy link
Copy Markdown
Owner

Not completely sure why the worker's mode tests failed yet; I retriggered them to run again. If they fail again I'll investigate more

I'm onboard with the header adjustment, that looks like what I thought it was supposed to be doing.

The SYNAPSE_VERSION dockerfile change though, I'm not sure how that will interfere with the build-context docker argument found places like this that I use to guarantee I'm getting the exact local image I want to use. It may do nothing, it may override it. Any insight on how this works?

@TafkaMax

TafkaMax commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

I can remove it here and just set the nginx opts. I used the synapse_version arg in docker compose to locally build against specific version of synapse with the nginx fixes.

@TafkaMax

TafkaMax commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

Removed the SYNAPSE_VERSION.

@realtyem
realtyem merged commit da2e877 into realtyem:master Feb 14, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants