loginsrv

Unnamed repository; edit this file 'description' to name the repository.
git clone git@jamesshield.xyz:repos/loginsrv.git
Log | Files | Refs | README | LICENSE

commit e1859a601857a3fc29f0f283cdd25aea6987e8eb
parent c92d63f93709799166a9a52734cbd536b6aee342
Author: Sebastian Mancke <s.mancke@tarent.de>
Date:   Wed,  3 May 2017 16:51:17 +0200

fixed prefix handling for github in caddy

Diffstat:
Mcaddy/handler.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/caddy/handler.go b/caddy/handler.go @@ -5,6 +5,7 @@ import ( "github.com/tarent/loginsrv/login" _ "github.com/tarent/loginsrv/osiam" "net/http" + "path" "strings" ) @@ -26,8 +27,7 @@ func NewCaddyHandler(next httpserver.Handler, path string, loginHandler *login.H } func (h *CaddyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) { - if httpserver.Path(r.URL.Path).Matches(h.path) && - strings.HasSuffix(r.URL.Path, "/login") { + if strings.HasPrefix(r.URL.Path, path.Join(h.path, "/login")) { h.loginHandler.ServeHTTP(w, r) return 0, nil } else {