File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ func (s *Server) registerRoutes(chatBasePath string) {
155
155
"screen" : ScreenUpdateBody {},
156
156
}, s .subscribeScreen )
157
157
158
+ s .router .Handle ("/" , http .HandlerFunc (s .redirectToChat ))
159
+
158
160
// Serve static files for the chat interface under /chat
159
161
s .registerStaticFileRoutes (chatBasePath )
160
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 ))
312
314
}
315
+
316
+ func (s * Server ) redirectToChat (w http.ResponseWriter , r * http.Request ) {
317
+ http .Redirect (w , r , "/chat" , http .StatusTemporaryRedirect )
318
+ }
You can’t perform that action at this time.
0 commit comments