From 0b754a95a799f5ad2a2ca42101e97d6aa8b5dc0b Mon Sep 17 00:00:00 2001
From: Adrian Scillato <35405447+ascillato@users.noreply.github.com>
Date: Thu, 5 Aug 2021 12:50:56 -0300
Subject: [PATCH 1/2] Make CORS to be optional
---
tasmota/my_user_config.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index e7d94b684..d9f4056a2 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -173,7 +173,8 @@
#define FRIENDLY_NAME "Tasmota" // [FriendlyName] Friendlyname up to 32 characters used by webpages and Alexa
#define EMULATION EMUL_NONE // [Emulation] Select Belkin WeMo (single relay/light) or Hue Bridge emulation (multi relay/light) (EMUL_NONE, EMUL_WEMO or EMUL_HUE)
#define EMULATION_HUE_1ST_GEN false // [Emulation] Force SetOption109 1 - if you only have Echo Dot 2nd gen devices
-#define CORS_DOMAIN "" // [Cors] CORS Domain for preflight requests
+//#define USE_CORS // [Cors] Enable CORS - Be aware that this feature is unsecure ATM (https://github.com/arendst/Tasmota/issues/6767)
+ #define CORS_DOMAIN "" // [Cors] CORS Domain for preflight requests
// -- HTTP Options --------------------------------
#define GUI_SHOW_HOSTNAME false // [SetOption53] Show hostname and IP address in GUI main menu
From 3d58912ef1bef9e5cb64660fcdde42444487d47b Mon Sep 17 00:00:00 2001
From: Adrian Scillato <35405447+ascillato@users.noreply.github.com>
Date: Thu, 5 Aug 2021 12:55:07 -0300
Subject: [PATCH 2/2] Set CORS as an optional feature in Webserver
---
tasmota/xdrv_01_webserver.ino | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino
index 7041bda45..2b250251f 100644
--- a/tasmota/xdrv_01_webserver.ino
+++ b/tasmota/xdrv_01_webserver.ino
@@ -292,7 +292,10 @@ const char HTTP_FORM_WIFI_PART2[] PROGMEM =
"