mcp: scaffolding of /.pomerium/mcp routes (#5580)

This commit is contained in:
Denis Mishin 2025-04-23 12:36:31 -04:00 committed by GitHub
parent cb0e8aaf06
commit f1a9401ddc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 100 additions and 0 deletions

View file

@ -24,6 +24,9 @@ func (p *Proxy) registerDashboardHandlers(r *mux.Router, opts *config.Options) *
h := httputil.DashboardSubrouter(r)
h.Use(middleware.SetHeaders(httputil.HeadersContentSecurityPolicy))
// model context protocol
h.PathPrefix("/mcp").Handler(p.mcp.HandlerFunc())
// special pomerium endpoints for users to view their session
h.Path("/").Handler(httputil.HandlerFunc(p.userInfo)).Methods(http.MethodGet)
h.Path("/device-enrolled").Handler(httputil.HandlerFunc(p.deviceEnrolled))