add CORS headers

this will allow external portal on the network to send credentials via browser.
This commit is contained in:
ohad
2018-05-14 11:47:13 +03:00
committed by GitHub
parent 718a8c8f4c
commit 128214a159
+1
View File
@@ -1159,6 +1159,7 @@ void WiFiManager::handleWifiSave() {
page += FPSTR(HTTP_END);
server->sendHeader(FPSTR(HTTP_HEAD_CL), String(page.length()));
server->sendHeader(HTTP_HEAD_CORS, HTTP_HEAD_CORS_ALLOW_ALL);
server->send(200, FPSTR(HTTP_HEAD_CT), page);
DEBUG_WM(DEBUG_DEV,F("Sent wifi save page"));