Add CSP header to RDP page to allow WebAssembly execution

- Added Content-Security-Policy header with 'unsafe-eval' for script-src
- Required for WebAssembly module loading in RDP client
- Only applied to RDP HTML responses
parent dedfd9f8
...@@ -2444,7 +2444,9 @@ static int handle_request(int client_fd, const http_request_t *req) { ...@@ -2444,7 +2444,9 @@ 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);
send_response(client_fd, 200, "OK", "text/html", html, len, NULL, NULL); // Add CSP header for WebAssembly support
const char *csp_header = "Content-Security-Policy: script-src 'self' 'unsafe-eval';";
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)
// Check if client exists // Check if client exists
......
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