From 37e18e4303da7c42c0840ad66f64400de816809c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 21 May 2024 18:57:30 +0200 Subject: redirect OpenID configuration requests to dex --- internal/server/server.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal') diff --git a/internal/server/server.go b/internal/server/server.go index cea349f..97851f0 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -188,6 +188,13 @@ func New(runtimeConfig *Config) (*Server, error) { } } }) + const oidcPath = "/.well-known/openid-configuration" + mux.HandleFunc( + hostname+oidcPath, + func(w http.ResponseWriter, r *http.Request) { + u := config.OIDCHost.JoinPath(oidcPath) + http.Redirect(w, r, u.String(), 302) + }) mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { newURL := runtimeConfig.BaseURL.String() + r.URL.String() -- cgit 1.4.1