trim the strings !!!!!!

This commit is contained in:
leah 2022-01-28 00:56:12 +00:00
parent 1908df3216
commit b10bd660b7
1 changed files with 3 additions and 3 deletions

View File

@ -133,10 +133,10 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
// http.SetCookie(w, &cookie)
// }
switch r.URL.Path {
case "/login", "/login/":
switch strings.TrimRight(r.URL.Path, "/") {
case "/login":
http.Redirect(w, r, requesturl, http.StatusFound)
case "/login/endpoint", "/login/endpoint/":
case "/login/endpoint":
loginEndpoint(w, r)
}
}