feat: add API to serve proxy certificate (#21391)

Closes https://github.com/coder/internal/issues/1184
This commit is contained in:
Danny Kopping
2025-12-29 18:00:06 +00:00
committed by GitHub
parent a173c38715
commit 733b6b7db9
7 changed files with 337 additions and 7 deletions
+6 -1
View File
@@ -230,6 +230,10 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
r.Route("/aibridge", aibridgeHandler(api, apiKeyMiddleware))
})
api.AGPL.APIHandler.Group(func(r chi.Router) {
r.Route("/aibridge/proxy", aibridgeproxyHandler(api, apiKeyMiddleware))
})
api.AGPL.APIHandler.Group(func(r chi.Router) {
r.Get("/entitlements", api.serveEntitlements)
// /regions overrides the AGPL /regions endpoint
@@ -691,7 +695,8 @@ type API struct {
licenseMetricsCollector *license.MetricsCollector
tailnetService *tailnet.ClientService
aibridgedHandler http.Handler
aibridgedHandler http.Handler
aibridgeproxydHandler http.Handler
}
// writeEntitlementWarningsHeader writes the entitlement warnings to the response header