Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

ui: send the Content-Security-Policy on the index document too

Martin Vogel839463d5c197
diff --git a/src/ui/http_server.c b/src/ui/http_server.c
index 6b7e56369..438f55e0c 100644
--- a/src/ui/http_server.c
+++ b/src/ui/http_server.c
@@ -1744,9 +1744,9 @@ static void dispatch_request(cbm_http_server_t *srv, cbm_http_conn_t *c,
if (cbm_http_path_match(req->path, "/")) {
const cbm_embedded_file_t *f = cbm_embedded_lookup("/index.html");
if (f) {
- char html_hdrs[512];
+ char html_hdrs[1024];
snprintf(html_hdrs, sizeof(html_hdrs),
- "%sContent-Type: text/html\r\nCache-Control: no-cache\r\n", g_cors);
+ "%sContent-Type: text/html\r\nCache-Control: no-cache\r\n" CBM_UI_CSP, g_cors);
cbm_http_reply_buf(c, 200, html_hdrs, f->data, (size_t)f->size);
return;
}