summary refs log tree commit diff
path: root/synapse/rest/base.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-14 09:52:20 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-14 09:55:16 +0100
commit9f863d34663a4d58cf59cd15e0b0aa4a8e8581a5 (patch)
tree9a5058698cf4a43b1257596a82c622dca30cdbc1 /synapse/rest/base.py
parentgrammar fix (diff)
downloadsynapse-9f863d34663a4d58cf59cd15e0b0aa4a8e8581a5.tar.xz
Start phasing out HttpServer: we should be using Resources instead. Added resource_for_client/federation/web_client to the HomeServer and hooked the C-S servlets to operate on resource_for_client. Dynamically construct the Resource tree.
Diffstat (limited to 'synapse/rest/base.py')
-rw-r--r--synapse/rest/base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/base.py b/synapse/rest/base.py
index 65d417f757..124b3a2e0c 100644
--- a/synapse/rest/base.py
+++ b/synapse/rest/base.py
@@ -16,6 +16,8 @@
 """ This module contains base REST classes for constructing REST servlets. """
 import re
 
+CLIENT_PREFIX = "/matrix/client/api/v1"
+
 
 def client_path_pattern(path_regex):
     """Creates a regex compiled client path with the correct client path
@@ -27,7 +29,7 @@ def client_path_pattern(path_regex):
     Returns:
         SRE_Pattern
     """
-    return re.compile("^/matrix/client/api/v1" + path_regex)
+    return re.compile("^" + CLIENT_PREFIX + path_regex)
 
 
 class RestServlet(object):