We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79b3101 commit 9366b1dCopy full SHA for 9366b1d
1 file changed
lib/httpapi/server.go
@@ -155,6 +155,8 @@ func (s *Server) registerRoutes(chatBasePath string) {
155
"screen": ScreenUpdateBody{},
156
}, s.subscribeScreen)
157
158
+ s.router.Handle("/", http.HandlerFunc(s.redirectToChat))
159
+
160
// Serve static files for the chat interface under /chat
161
s.registerStaticFileRoutes(chatBasePath)
162
}
@@ -310,3 +312,7 @@ func (s *Server) registerStaticFileRoutes(chatBasePath string) {
310
312
s.router.Handle("/chat", http.StripPrefix("/chat", chatHandler))
311
313
s.router.Handle("/chat/*", http.StripPrefix("/chat", chatHandler))
314
315
316
+func (s *Server) redirectToChat(w http.ResponseWriter, r *http.Request) {
317
+ http.Redirect(w, r, "/chat", http.StatusTemporaryRedirect)
318
+}
0 commit comments