From d40c62cb5338456add61caf6a13783b214609148 Mon Sep 17 00:00:00 2001 From: Luc Date: Tue, 1 Oct 2019 08:48:27 +0800 Subject: [PATCH] Allow to send web command from another server if enabled mainly for camera html hosted on another server --- esp3d/src/core/esp3doutput.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esp3d/src/core/esp3doutput.cpp b/esp3d/src/core/esp3doutput.cpp index 4e705aed..9640ba5f 100644 --- a/esp3d/src/core/esp3doutput.cpp +++ b/esp3d/src/core/esp3doutput.cpp @@ -199,6 +199,9 @@ size_t ESP3DOutput::printMSG(const char * s) if (_webserver) { if (!_headerSent && !_footerSent) { _webserver->sendHeader("Cache-Control","no-cache"); +#ifdef ESP_ACCESS_CONTROL_ALLOW_ORIGIN + _webserver->sendHeader("Access-Control-Allow-Origin", "*"); +#endif //ESP_ACCESS_CONTROL_ALLOw_ORIGIN _webserver->send (_code, "text/plain", s); _headerSent = true; _footerSent = true;