diff --git a/caddy/setup.go b/caddy/setup.go index 8c11354..29642a2 100644 --- a/caddy/setup.go +++ b/caddy/setup.go @@ -35,7 +35,7 @@ func setup(c *caddy.Controller) error { if len(args) == 1 { logging.Logger.Warnf("DEPRECATED: Please set the loing path by parameter login_path and not as directive argument (%v:%v)", c.File(), c.Line()) - config.LoginPath = args[0] + config.LoginPath = args[0] + "/login" } if e, isset := os.LookupEnv("JWT_SECRET"); isset { diff --git a/caddy/setup_test.go b/caddy/setup_test.go index dc7f6fc..a57ba6a 100644 --- a/caddy/setup_test.go +++ b/caddy/setup_test.go @@ -68,7 +68,7 @@ func TestSetup(t *testing.T) { // * login path as argument // * '-' in parameter names // * backend config by 'backend provider=' - input: `loginsrv /foo { + input: `loginsrv /context { backend provider=simple,bob=secret cookie-name cookiename }`, @@ -76,7 +76,7 @@ func TestSetup(t *testing.T) { config: login.Config{ JwtSecret: "jwtsecret", SuccessUrl: "/", - LoginPath: "/foo", + LoginPath: "/context/login", CookieName: "cookiename", CookieHttpOnly: true, Backends: login.Options{