mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 07:12:48 -05:00
Add a welcome page to the static resources
This is largely a precursor for the removal of the bundled webclient. The idea is to present a page at / which reassures people that something is working, and to give them some links for next steps. The welcome page lives at `/_matrix/static/`, so is enabled alongside the other `static` resources (which, in practice, means the client API is enabled). We'll redirect to it from `/` if we have nothing better to display there. It would be nice to have a way to disable it (in the same way that you might disable the nginx welcome page), but I can't really think of a good way to do that without a load of ickiness. It's based on the work done by @krombel for #2601.
This commit is contained in:
parent
a2ed0f287e
commit
f537432ef9
3 changed files with 30 additions and 0 deletions
|
|
@ -137,8 +137,11 @@ class SynapseHomeServer(HomeServer):
|
|||
handler = handler_cls(config, module_api)
|
||||
resources[path] = AdditionalResource(self, handler.handle_request)
|
||||
|
||||
# try to find something useful to redirect '/' to
|
||||
if WEB_CLIENT_PREFIX in resources:
|
||||
root_resource = RootRedirect(WEB_CLIENT_PREFIX)
|
||||
elif STATIC_PREFIX in resources:
|
||||
root_resource = RootRedirect(STATIC_PREFIX)
|
||||
else:
|
||||
root_resource = NoResource()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue