Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
CORSMiddleware restricts browser cross-origin access to the API. allowedOriginsCSV is a comma-separated list of exact origins (e.g. https://app.example.com,http://localhost:5173). If empty, the handler is returned unchanged (no CORS headers — same-origin / non-browser clients only).
func MountAPI ¶
func MountAPI(mux *http.ServeMux, store storage.Provider, j *auth.JWT, graphSvc *graph.Service, vaultRoot string, assets blob.Provider)
MountAPI registers SaaS REST routes on mux. Public: /api/v1/health, /api/v1/auth/token. All other /api/v1/* routes require Authorization: Bearer <JWT>. If graphSvc is non-nil, POST /api/v1/pages/reindex is registered (markdown → index). vaultRoot is the indexed notes directory (absolute). When empty, capture and graph return 503. assets may use filesystem under vaultRoot or S3/MinIO via blobProv when non-nil.
Types ¶
This section is empty.