diff --git a/coderd/coderd.go b/coderd/coderd.go index ad4847e868..fc9f298cf7 100644 --- a/coderd/coderd.go +++ b/coderd/coderd.go @@ -1044,10 +1044,12 @@ func New(options *Options) *API { // OAuth2 metadata endpoint for RFC 8414 discovery r.Route("/.well-known/oauth-authorization-server", func(r chi.Router) { + r.Use(httpmw.RequireExperimentWithDevBypass(api.Experiments, codersdk.ExperimentOAuth2)) r.Get("/*", api.oauth2AuthorizationServerMetadata()) }) // OAuth2 protected resource metadata endpoint for RFC 9728 discovery r.Route("/.well-known/oauth-protected-resource", func(r chi.Router) { + r.Use(httpmw.RequireExperimentWithDevBypass(api.Experiments, codersdk.ExperimentOAuth2)) r.Get("/*", api.oauth2ProtectedResourceMetadata()) })