summary refs log tree commit diff
path: root/synapse/rest/client/v1/base.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-05-15 23:30:22 -0500
committerAmber Brown <hawkowl@atleastfornow.net>2019-05-15 23:30:22 -0500
commitd424ba9e5bbcb63ae3929401a27cb89ac269938f (patch)
tree45a6f462ab3b34091193665f5a2e0c5bf195dcbe /synapse/rest/client/v1/base.py
parentMerge remote-tracking branch 'origin/develop' into shhs (diff)
parentMake all the rate limiting options more consistent (#5181) (diff)
downloadsynapse-d424ba9e5bbcb63ae3929401a27cb89ac269938f.tar.xz
Merge remote-tracking branch 'origin/develop' into shhs
Diffstat (limited to 'synapse/rest/client/v1/base.py')
-rw-r--r--synapse/rest/client/v1/base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/base.py b/synapse/rest/client/v1/base.py

index c77d7aba68..dc63b661c0 100644 --- a/synapse/rest/client/v1/base.py +++ b/synapse/rest/client/v1/base.py
@@ -19,7 +19,7 @@ import logging import re -from synapse.api.urls import CLIENT_PREFIX +from synapse.api.urls import CLIENT_API_PREFIX from synapse.http.servlet import RestServlet from synapse.rest.client.transactions import HttpTransactionCache @@ -36,12 +36,12 @@ def client_path_patterns(path_regex, releases=(0,), include_in_unstable=True): Returns: SRE_Pattern """ - patterns = [re.compile("^" + CLIENT_PREFIX + path_regex)] + patterns = [re.compile("^" + CLIENT_API_PREFIX + "/api/v1" + path_regex)] if include_in_unstable: - unstable_prefix = CLIENT_PREFIX.replace("/api/v1", "/unstable") + unstable_prefix = CLIENT_API_PREFIX + "/unstable" patterns.append(re.compile("^" + unstable_prefix + path_regex)) for release in releases: - new_prefix = CLIENT_PREFIX.replace("/api/v1", "/r%d" % release) + new_prefix = CLIENT_API_PREFIX + "/r%d" % (release,) patterns.append(re.compile("^" + new_prefix + path_regex)) return patterns