Bandaid fix for CORS
This commit is contained in:
parent
3377da4c27
commit
09369cf7f2
@ -116,6 +116,7 @@ void updateUtilization(){
|
||||
enum MHD_Result sendPage(struct MHD_Connection *connection, char* page, char *mimetype){
|
||||
struct MHD_Response *response = MHD_create_response_from_buffer(strlen(page), (void *) page, MHD_RESPMEM_PERSISTENT);
|
||||
MHD_add_response_header(response, "Content-Type", mimetype);
|
||||
MHD_add_response_header(response, "Access-Control-Allow-Origin", "*");
|
||||
enum MHD_Result result = MHD_queue_response(connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response(response);
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user