From a7fdca65e1fb9eb645fa6616e30c17f95479158f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 20 Nov 2014 17:53:17 +0000 Subject: [PATCH] ACAO header is added --- src/pmwebapi/pmresapi.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pmwebapi/pmresapi.cxx b/src/pmwebapi/pmresapi.cxx index af14d81..a657b72 100644 --- a/src/pmwebapi/pmresapi.cxx +++ b/src/pmwebapi/pmresapi.cxx @@ -209,6 +209,11 @@ pmwebres_respond (struct MHD_Connection *connection, const http_params& params, (void) MHD_add_response_header (resp, "Cache-Control", "public"); + // Per Frank suggestion, added this header to have javascript + // ability to list files at the url served by pmwebd + + (void) MHD_add_response_header (resp, "Access-Control-Allow-Origin", "*"); + rc = MHD_queue_response (connection, resp_code, resp); MHD_destroy_response (resp); return rc; -- 1.8.4.2