From 1bd4b90a7814fa95c4d12d1f2d1ede5623aaf787 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 18 Nov 2022 21:52:13 +0100 Subject: [PATCH] Added Static HTML from Synapse --- setup/base/base.go | 4 +-- static/index.html | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 static/index.html diff --git a/setup/base/base.go b/setup/base/base.go index 9a158d9b7..748e172dc 100644 --- a/setup/base/base.go +++ b/setup/base/base.go @@ -472,9 +472,7 @@ func (b *BaseDendrite) SetupAndServeHTTP( } b.PublicStaticMux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(200) - w.Header().Set("Content-Type", "application/json") - _, _ = w.Write([]byte(`{"message":"hello world"}`)) + http.ServeFile(w, r, "static/index.html") }) b.DendriteAdminMux.HandleFunc("/monitor/up", func(w http.ResponseWriter, r *http.Request) { diff --git a/static/index.html b/static/index.html new file mode 100644 index 000000000..913732c46 --- /dev/null +++ b/static/index.html @@ -0,0 +1,63 @@ + + + + Dendrite is running + + + + +

It works! Dendrite is running

+

Your Dendrite server is listening on this port and is ready for messages.

+

To use this server you'll need a Matrix client. +

+

Welcome to the Matrix universe :)

+
+

+ + + matrix.org + + +

+ +