Update CSP to allow external CDN resources

- Added https://cdn.jsdelivr.net and https://cdnjs.cloudflare.com to script-src, style-src, and font-src
- Required for Bootstrap and FontAwesome loading
- Maintains security while allowing necessary external resources
parent 8ae74833
...@@ -2444,8 +2444,8 @@ static int handle_request(int client_fd, const http_request_t *req) { ...@@ -2444,8 +2444,8 @@ static int handle_request(int client_fd, const http_request_t *req) {
char html[32768]; char html[32768];
int len = snprintf(html, sizeof(html), rdp_page_html, int len = snprintf(html, sizeof(html), rdp_page_html,
client_id, client_id, client_id, client_id, client_id); client_id, client_id, client_id, client_id, client_id);
// Add CSP header for WebAssembly support // Add CSP header for WebAssembly support and external resources
const char *csp_header = "Content-Security-Policy: script-src 'self' 'unsafe-eval';"; const char *csp_header = "Content-Security-Policy: script-src 'self' 'unsafe-eval' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; style-src 'self' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; font-src 'self' https://cdnjs.cloudflare.com;";
send_response(client_fd, 200, "OK", "text/html", html, len, NULL, csp_header); send_response(client_fd, 200, "OK", "text/html", html, len, NULL, csp_header);
} else { } else {
// Handle RDP actions (connect, disconnect) // Handle RDP actions (connect, disconnect)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment