Compare commits
3 Commits
7b04212ba5
...
6968544048
Author | SHA1 | Date |
---|---|---|
Maxim Lebedev | 6968544048 | |
Maxim Lebedev | 704765d804 | |
Maxim Lebedev | 009e9eb163 |
|
@ -51,7 +51,7 @@ func (h *Handler) Handler() http.Handler {
|
|||
Skipper: func(w http.ResponseWriter, r *http.Request) bool {
|
||||
head, _ := urlutil.ShiftPath(r.URL.Path)
|
||||
|
||||
return r.Method == http.MethodPost && head == "authorize"
|
||||
return r.Method == http.MethodPost && head == ""
|
||||
},
|
||||
CookieMaxAge: 0,
|
||||
CookieSameSite: http.SameSiteStrictMode,
|
||||
|
@ -68,7 +68,7 @@ func (h *Handler) Handler() http.Handler {
|
|||
Skipper: func(w http.ResponseWriter, r *http.Request) bool {
|
||||
head, _ := urlutil.ShiftPath(r.URL.Path)
|
||||
|
||||
return r.Method != http.MethodPost || head != "api"
|
||||
return r.Method != http.MethodPost || head != "verify"
|
||||
},
|
||||
Validator: func(w http.ResponseWriter, r *http.Request, login, password string) (bool, error) {
|
||||
userMatch := subtle.ConstantTimeCompare([]byte(login),
|
||||
|
|
Loading…
Reference in New Issue