Added web client prefix
This commit is contained in:
parent
c75add6ec8
commit
d253a35539
|
@ -17,3 +17,4 @@
|
||||||
|
|
||||||
CLIENT_PREFIX = "/matrix/client/api/v1"
|
CLIENT_PREFIX = "/matrix/client/api/v1"
|
||||||
FEDERATION_PREFIX = "/matrix/federation/v1"
|
FEDERATION_PREFIX = "/matrix/federation/v1"
|
||||||
|
WEB_CLIENT_PREFIX = "/matrix/client"
|
|
@ -26,7 +26,7 @@ from twisted.web.static import File
|
||||||
from twisted.web.server import Site
|
from twisted.web.server import Site
|
||||||
from synapse.http.server import JsonResource, RootRedirect
|
from synapse.http.server import JsonResource, RootRedirect
|
||||||
from synapse.http.client import TwistedHttpClient
|
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
|
from daemonize import Daemonize
|
||||||
|
|
||||||
|
@ -104,11 +104,11 @@ class SynapseHomeServer(HomeServer):
|
||||||
]
|
]
|
||||||
if web_client:
|
if web_client:
|
||||||
logger.info("Adding the 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()))
|
self.get_resource_for_web_client()))
|
||||||
|
|
||||||
if web_client and redirect_root_to_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:
|
else:
|
||||||
self.root_resource = Resource()
|
self.root_resource = Resource()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue