Merge pull request #4289 from matrix-org/rav/welcome_page

Add a welcome page to the static resources
This commit is contained in:
Richard van der Hoff 2018-12-11 16:24:06 +01:00 committed by GitHub
commit 95c1f6500b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 0 deletions

1
changelog.d/4289.feature Normal file
View file

@ -0,0 +1 @@
Add a welcome page for the client API port. Credit to @krombel!

View file

@ -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()

26
synapse/static/index.html Normal file
View file

@ -0,0 +1,26 @@
<html>
<head>
<title>Synapse is running</title>
<style>
body {
width: 30em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
h1 {
text-align: center;
}
</style>
</head>
<body>
<h1>Synapse is running</h1>
<p>Congratulations!</p>
<p>Your Synapse server is listening on this port and is ready for messages.</p>
<p>To use this server you'll need a client - e.g. one of
<a href="https://matrix.org/docs/projects/try-matrix-now.html#clients">this list of Matrix clients</a>.</p>
<p>You can find (federated) rooms that might be of interest to you on
<a href="https://view.matrix.org/">view.matrix.org</a>.</p>
<p>Or you just start creating your own rooms with your friends.</p>
<p>Welcome to the Matrix universe :)</p>
</body>
</html>