diff --git a/oauth2/mux.go b/oauth2/mux.go index 5e778d0a5..f9881cbe6 100644 --- a/oauth2/mux.go +++ b/oauth2/mux.go @@ -23,8 +23,8 @@ func NewAuthMux(p Provider, a Authenticator, t Tokenizer, basepath string, l chr Tokens: t, SuccessURL: path.Join(basepath, "/"), FailureURL: path.Join(basepath, "/login"), - Now: DefaultNowTime, - Logger: l, + Now: DefaultNowTime, + Logger: l, } } diff --git a/server/mux.go b/server/mux.go index 6237eedc7..cd3409e1a 100644 --- a/server/mux.go +++ b/server/mux.go @@ -234,8 +234,11 @@ func AuthAPI(opts MuxOpts, router chronograf.Router) (http.Handler, AuthRoutes) }) } - rootPath := path.Join(opts.Basepath, "/chronograf/v1/") - logoutPath := path.Join(opts.Basepath, "/oauth/logout") + // Y U NO WORKY WITH PATH JOIN? + //rootPath := path.Join(opts.Basepath, "/chronograf/v1/") + //logoutPath := path.Join(opts.Basepath, "/oauth/logout") + rootPath := opts.Basepath + "/chronograf/v1/" + logoutPath := opts.Basepath + "/oauth/logout" tokenMiddleware := AuthorizedToken(opts.Auth, opts.Logger, router) // Wrap the API with token validation middleware.