21 lines
527 B
Go
21 lines
527 B
Go
package handlers
|
|
|
|
import (
|
|
"cursor-api-proxy/internal/config"
|
|
"cursor-api-proxy/internal/httputil"
|
|
"net/http"
|
|
)
|
|
|
|
func HandleHealth(w http.ResponseWriter, r *http.Request, version string, cfg config.BridgeConfig) {
|
|
httputil.WriteJSON(w, 200, map[string]interface{}{
|
|
"ok": true,
|
|
"version": version,
|
|
"workspace": cfg.Workspace,
|
|
"mode": cfg.Mode,
|
|
"defaultModel": cfg.DefaultModel,
|
|
"force": cfg.Force,
|
|
"approveMcps": cfg.ApproveMcps,
|
|
"strictModel": cfg.StrictModel,
|
|
}, nil)
|
|
}
|