Handler returns an HTTP handler for the AI Bridge Proxy's HTTP endpoints. This is separate from the proxy server itself and is used by coderd to serve endpoints like the CA certificate.
()
| 1136 | // This is separate from the proxy server itself and is used by coderd to |
| 1137 | // serve endpoints like the CA certificate. |
| 1138 | func (s *Server) Handler() http.Handler { |
| 1139 | r := chi.NewRouter() |
| 1140 | r.Get("/ca-cert.pem", s.serveCACert) |
| 1141 | return r |
| 1142 | } |
| 1143 | |
| 1144 | // serveCACert is an HTTP handler that serves the CA certificate used for MITM |
| 1145 | // proxying. Clients need this certificate to trust the proxy's intercepted |