Merge branch 'master' into develop
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
commit
6968544048
|
@ -51,7 +51,7 @@ func (h *Handler) Handler() http.Handler {
|
||||||
Skipper: func(w http.ResponseWriter, r *http.Request) bool {
|
Skipper: func(w http.ResponseWriter, r *http.Request) bool {
|
||||||
head, _ := urlutil.ShiftPath(r.URL.Path)
|
head, _ := urlutil.ShiftPath(r.URL.Path)
|
||||||
|
|
||||||
return r.Method == http.MethodPost && head == "authorize"
|
return r.Method == http.MethodPost && head == ""
|
||||||
},
|
},
|
||||||
CookieMaxAge: 0,
|
CookieMaxAge: 0,
|
||||||
CookieSameSite: http.SameSiteStrictMode,
|
CookieSameSite: http.SameSiteStrictMode,
|
||||||
|
@ -68,7 +68,7 @@ func (h *Handler) Handler() http.Handler {
|
||||||
Skipper: func(w http.ResponseWriter, r *http.Request) bool {
|
Skipper: func(w http.ResponseWriter, r *http.Request) bool {
|
||||||
head, _ := urlutil.ShiftPath(r.URL.Path)
|
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) {
|
Validator: func(w http.ResponseWriter, r *http.Request, login, password string) (bool, error) {
|
||||||
userMatch := subtle.ConstantTimeCompare([]byte(login),
|
userMatch := subtle.ConstantTimeCompare([]byte(login),
|
||||||
|
|
2
main.go
2
main.go
|
@ -351,8 +351,6 @@ func (app *App) Handler() http.Handler {
|
||||||
|
|
||||||
switch head {
|
switch head {
|
||||||
case "", "callback", "token", "introspect", "revocation":
|
case "", "callback", "token", "introspect", "revocation":
|
||||||
r.URL = r.URL.JoinPath(head, r.URL.Path)
|
|
||||||
default:
|
|
||||||
if r.URL.Path != "/" {
|
if r.URL.Path != "/" {
|
||||||
r.URL = r.URL.JoinPath(head, r.URL.Path)
|
r.URL = r.URL.JoinPath(head, r.URL.Path)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue