diff options
author | Erik Johnston <erik@matrix.org> | 2015-07-01 15:12:57 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-07-01 15:12:57 +0100 |
commit | 67362a9a034a9a8945c10faf78e9b13598e3dc9e (patch) | |
tree | c523d50061b18df57d33397dfdfb586fd267bbdd /synapse/server.py | |
parent | clarify readme a bit more (diff) | |
parent | Bump changelog and version to v0.9.3 (diff) | |
download | synapse-9cb986de8f60183bba0e5dc08be421b03ae0babd.tar.xz |
Merge branch 'release-v0.9.3' of github.com:matrix-org/synapse v0.9.3
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/synapse/server.py b/synapse/server.py index 8b3dc675cc..4d1fb1cbf6 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -132,16 +132,8 @@ class BaseHomeServer(object): setattr(BaseHomeServer, "get_%s" % (depname), _get) def get_ip_from_request(self, request): - # May be an X-Forwarding-For header depending on config - ip_addr = request.getClientIP() - if self.config.captcha_ip_origin_is_x_forwarded: - # use the header - if request.requestHeaders.hasHeader("X-Forwarded-For"): - ip_addr = request.requestHeaders.getRawHeaders( - "X-Forwarded-For" - )[0] - - return ip_addr + # X-Forwarded-For is handled by our custom request type. + return request.getClientIP() def is_mine(self, domain_specific_string): return domain_specific_string.domain == self.hostname |