From e65790e55eb0b1ac5f2efffcba2243d846937141 Mon Sep 17 00:00:00 2001 From: Tiberiu Ana Date: Thu, 23 May 2019 12:21:08 +0200 Subject: [PATCH] Add CORS preflight support to console URL Please see #5847 for reference. --- sonoff/xdrv_01_webserver.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index fc5ffa467..163453109 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -480,7 +480,8 @@ void StartWebserver(int type, IPAddress ipweb) WebServer->on("/u1", HandleUpgradeFirmwareStart); // OTA WebServer->on("/u2", HTTP_POST, HandleUploadDone, HandleUploadLoop); 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); #ifndef FIRMWARE_MINIMAL WebServer->on("/cn", HandleConfiguration);