From 739c132a61995e344390182b06f0c982ce409f0c Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 14 Nov 2018 16:59:07 +0100 Subject: [PATCH] Added CORS headers to HTTP error messages --- src/output/output_http.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/output/output_http.cpp b/src/output/output_http.cpp index 14bdfa7a..07d92779 100644 --- a/src/output/output_http.cpp +++ b/src/output/output_http.cpp @@ -43,6 +43,8 @@ namespace Mist { INFO_MSG("Failing '%s': %s: %s", streamName.c_str(), H.url.c_str(), msg.c_str()); if (!webSock){ H.Clean(); //make sure no parts of old requests are left in any buffers + H.SetHeader("Server", "MistServer/" PACKAGE_VERSION); + H.setCORSHeaders(); H.SetBody("Could not retrieve stream: "+msg); H.SendResponse("404", "Error opening stream", myConn); }