Compare commits

..

No commits in common. "0b8a1317d5efe6b7bc514f3ae9d6515db0c6503d" and "82f6c1ea5427d8aa80b7ee05ad5b57e44cf9ec50" have entirely different histories.

2 changed files with 8 additions and 11 deletions

2
assets/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.fasthttp.br
*.fasthttp.gz

17
main.go
View File

@ -350,22 +350,17 @@ func (app *App) Handler() http.Handler {
head, r.URL.Path = urlutil.ShiftPath(r.URL.Path)
switch head {
case "", "callback", "token", "introspect", "revocation":
default:
r.URL = r.URL.JoinPath(head, r.URL.Path)
default:
if r.URL.Path != "/" {
r.URL = r.URL.JoinPath(head, r.URL.Path)
} else {
r.URL = r.URL.JoinPath(head)
}
}
switch head {
default:
static.ServeHTTP(w, r)
case "", "callback":
r.URL = r.URL.JoinPath(head, r.URL.Path)
client.ServeHTTP(w, r)
case "token", "introspect", "revocation":
r.URL = r.URL.JoinPath(head, r.URL.Path)
token.ServeHTTP(w, r)
case ".well-known":
if head, _ = urlutil.ShiftPath(r.URL.Path); head == "oauth-authorization-server" {
@ -382,5 +377,5 @@ func (app *App) Handler() http.Handler {
case "ticket":
ticket.ServeHTTP(w, r)
}
}) /*.Intercept(middleware.LogFmt())*/)
}).Intercept(middleware.LogFmt()))
}