trim the strings !!!!!!
This commit is contained in:
parent
1908df3216
commit
b10bd660b7
6
main.go
6
main.go
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue