diff options
author | Erik Johnston <erik@matrix.org> | 2015-06-15 18:05:58 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-06-15 18:05:58 +0100 |
commit | bc42ca121f2fe6e58c65f1c728cf78f9d9823dfa (patch) | |
tree | 11897d4024d321800c24b105b57665d8db806f36 /synapse/server.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
parent | Remove redundant newline (diff) | |
download | synapse-bc42ca121f2fe6e58c65f1c728cf78f9d9823dfa.tar.xz |
Merge pull request #185 from matrix-org/erikj/listeners_config
Change listener config.
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 |