Skip to content

Conversation

anoadragon453
Copy link
Member

This method raises a SynapseException if Synapse is unable to extract the IP address of a client from an incoming request. This typically indicates that there is an invalid configuration in one's reverse proxy.

I chose to raise an exception, rather than returning a dummy IP address, as it's typically better to fail loudly.

Closes #18940, which noted that Synapse doesn't return a particularly useful error in one of the cases.

This method raises a `SynapseException` if Synapse is unable to extract the IP address of a client from an incoming request. This
typically indicates that there is an invalid configuration in one's reverse proxy.

Raise an exception rather than returning a dummy IP address, as it's typically better to fail loudly in this case.
@anoadragon453 anoadragon453 force-pushed the anoa/raise_exception_on_ip_address_failure branch from 7c36a84 to 50b74ba Compare October 1, 2025 16:28
Comment on lines +317 to +318
"Unable to view IP address of the requester. " \
"Check that you are setting the X-Forwarded-For header correctly in your reverse proxy."
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the fix in #18940, though I don't know whether there are any other potential causes that a Twisted wouldn't be able to get an IP address for the client?

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.

Media api failure over unix socket: AttributeError: 'UNIXAddress' object has no attribute 'host'
1 participant