Added more inclusive CORS policy (#4767)

This commit is contained in:
Szymon Zmilczak 2021-02-16 00:49:30 +01:00 committed by GitHub
parent 7e8993fc83
commit d964873840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,6 +412,8 @@ void WebServer::_prepareHeader(String& response, int code, const char* content_t
}
if (_corsEnabled) {
sendHeader(String(FPSTR("Access-Control-Allow-Origin")), String("*"));
sendHeader(String(FPSTR("Access-Control-Allow-Methods")), String("*"));
sendHeader(String(FPSTR("Access-Control-Allow-Headers")), String("*"));
}
sendHeader(String(F("Connection")), String(F("close")));