about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--internal/server/server.go7
1 files changed, 7 insertions, 0 deletions
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()