Compare commits

...

3 Commits

Author SHA1 Message Date
Maxim Lebedev 6968544048
Merge branch 'master' into develop
continuous-integration/drone/push Build is passing Details
2023-01-17 00:20:00 +06:00
Maxim Lebedev 704765d804
Merge branch 'hotfix/urlpath'
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-01-17 00:19:59 +06:00
Maxim Lebedev 009e9eb163
🐛 Fixed duplicating path join 2023-01-17 00:19:54 +06:00
2 changed files with 2 additions and 4 deletions

View File

@ -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),

View File

@ -351,8 +351,6 @@ func (app *App) Handler() http.Handler {
switch head {
case "", "callback", "token", "introspect", "revocation":
r.URL = r.URL.JoinPath(head, r.URL.Path)
default:
if r.URL.Path != "/" {
r.URL = r.URL.JoinPath(head, r.URL.Path)
} else {