diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-14 11:54:37 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-14 11:54:37 +0100 |
commit | d253a3553967948e277929549a4ae6367584342f (patch) | |
tree | efc1df8dd5631e2058ed4bec4b6dad953ce51929 | |
parent | Added a urls module for keeping client and federation prefixes. (diff) | |
download | synapse-d253a3553967948e277929549a4ae6367584342f.tar.xz |
Added web client prefix
Diffstat (limited to '')
-rw-r--r-- | synapse/api/urls.py | 3 | ||||
-rw-r--r-- | synapse/app/homeserver.py | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/synapse/api/urls.py b/synapse/api/urls.py index 7a6fff7d18..04970adb71 100644 --- a/synapse/api/urls.py +++ b/synapse/api/urls.py @@ -16,4 +16,5 @@ """Contains the URL paths to prefix various aspects of the server with. """ CLIENT_PREFIX = "/matrix/client/api/v1" -FEDERATION_PREFIX = "/matrix/federation/v1" \ No newline at end of file +FEDERATION_PREFIX = "/matrix/federation/v1" +WEB_CLIENT_PREFIX = "/matrix/client" \ No newline at end of file diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 7c356e7855..fc12e0dba5 100644 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -26,7 +26,7 @@ from twisted.web.static import File from twisted.web.server import Site from synapse.http.server import JsonResource, RootRedirect from synapse.http.client import TwistedHttpClient -from synapse.api.urls import CLIENT_PREFIX, FEDERATION_PREFIX +from synapse.api.urls import CLIENT_PREFIX, FEDERATION_PREFIX, WEB_CLIENT_PREFIX from daemonize import Daemonize @@ -104,11 +104,11 @@ class SynapseHomeServer(HomeServer): ] if web_client: logger.info("Adding the web client.") - desired_tree.append(("/matrix/client", # TODO constant please + desired_tree.append((WEB_CLIENT_PREFIX, self.get_resource_for_web_client())) if web_client and redirect_root_to_web_client: - self.root_resource = RootRedirect("/matrix/client") + self.root_resource = RootRedirect(WEB_CLIENT_PREFIX) else: self.root_resource = Resource() |