Merge pull request #5852 from tiberiuana/console-cors

Add CORS preflight support to console URL
This commit is contained in:
Theo Arends 2019-05-23 12:46:00 +02:00 committed by GitHub
commit 644d89c509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -480,7 +480,8 @@ void StartWebserver(int type, IPAddress ipweb)
WebServer->on("/u1", HandleUpgradeFirmwareStart); // OTA WebServer->on("/u1", HandleUpgradeFirmwareStart); // OTA
WebServer->on("/u2", HTTP_POST, HandleUploadDone, HandleUploadLoop); WebServer->on("/u2", HTTP_POST, HandleUploadDone, HandleUploadLoop);
WebServer->on("/u2", HTTP_OPTIONS, HandlePreflightRequest); WebServer->on("/u2", HTTP_OPTIONS, HandlePreflightRequest);
WebServer->on("/cs", HandleConsole); WebServer->on("/cs", HTTP_GET, HandleConsole);
WebServer->on("/cs", HTTP_OPTIONS, HandlePreflightRequest);
WebServer->on("/cm", HandleHttpCommand); WebServer->on("/cm", HandleHttpCommand);
#ifndef FIRMWARE_MINIMAL #ifndef FIRMWARE_MINIMAL
WebServer->on("/cn", HandleConfiguration); WebServer->on("/cn", HandleConfiguration);