From 66ef7203a30e30c7e6a35bad8b47d139b9812795 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Mon, 16 Jan 2023 18:11:02 +0600 Subject: [PATCH 1/2] :bug: Fixed assets URL support --- main.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 104b4ed..f89f53c 100644 --- a/main.go +++ b/main.go @@ -350,17 +350,22 @@ func (app *App) Handler() http.Handler { head, r.URL.Path = urlutil.ShiftPath(r.URL.Path) switch head { - default: + 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 { + 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" { @@ -377,5 +382,5 @@ func (app *App) Handler() http.Handler { case "ticket": ticket.ServeHTTP(w, r) } - }).Intercept(middleware.LogFmt())) + }) /*.Intercept(middleware.LogFmt())*/) } From 202a505916569cfa4ab905e0f690311b8e2c8fd7 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Mon, 16 Jan 2023 18:11:20 +0600 Subject: [PATCH 2/2] :fire: Removed .gitignore from static assets --- assets/.gitignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 assets/.gitignore diff --git a/assets/.gitignore b/assets/.gitignore deleted file mode 100644 index 1770231..0000000 --- a/assets/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.fasthttp.br -*.fasthttp.gz