about summary refs log tree commit diff
path: root/src/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.go')
-rw-r--r--src/http.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/http.go b/src/http.go
index 9632787..7bddad6 100644
--- a/src/http.go
+++ b/src/http.go
@@ -67,6 +67,10 @@ func registerPostHandler(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	if !isValid(username) {
+		indexHander(w, r)
+	}
+
 	// add the new username to the list of usernames
 	usernames = append(usernames, username)
 
@@ -107,6 +111,13 @@ func isUniq(username string) bool {
 	return true
 }
 
+func isValid(username string) bool {
+	if username == "traefik" || username == "register" {
+		return false
+	}
+	return true
+}
+
 func readFileToReponse(w http.ResponseWriter, path string) {
 	requestedFile := strings.Replace(path, "..", "", -1)