fix: generate a per-installation root CA

This commit is contained in:
leokun
2026-08-12 20:04:29 +08:00
parent 7a67e76617
commit 2b8d1c9e3d
14 changed files with 454 additions and 89 deletions
+1 -3
View File
@@ -8,8 +8,6 @@ import (
"net/http"
"strings"
"time"
"cursor/internal/certs"
)
//go:embed web/*
@@ -93,7 +91,7 @@ func (server *Server) handleEvents(writer http.ResponseWriter, request *http.Req
func (server *Server) handleCACertificate(writer http.ResponseWriter, _ *http.Request) {
writer.Header().Set("Content-Type", "application/x-x509-ca-cert")
writer.Header().Set("Content-Disposition", `attachment; filename="cursor-local-proxy-ca.crt"`)
_, _ = writer.Write(certs.EmbeddedCACertPEM())
_, _ = writer.Write(server.caCertPEM)
}
func writeJSON(writer http.ResponseWriter, status int, payload any) {