summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index 74bfa6c..a002662 100644
--- a/server/server.go
+++ b/server/server.go
@@ -79,6 +79,10 @@ func routing(w http.ResponseWriter, r *http.Request, jsEnabled bool) {
path := strings.TrimPrefix(url.Path, "/")
segments := strings.Split(path, "/")
+ if len(segments[0]) == 0 {
+ http.Redirect(w, r, "", http.StatusTemporaryRedirect)
+ }
+
target, err := services.MatchRequest(segments[0])
if err != nil {
log.Printf("Error during match request: %v\n", err)