🎨 Inlines cors wildcard

This commit is contained in:
Rune Harlyk
2025-07-16 20:33:12 +02:00
parent 43e76770a8
commit 9c984d3215
3 changed files with 1 additions and 6 deletions
-1
View File
@@ -4,7 +4,6 @@ build_flags =
-D APPLICATION_CORE=0
-D EMBED_WWW
-D SERVE_CONFIG_FILES
-D CORS_ORIGIN=\"*\"
-D ENABLE_CORS
-D USE_MSGPACK=1 ; Use either msgpack or json
-4
View File
@@ -26,10 +26,6 @@
#include <WWWData.h>
#endif
#ifndef CORS_ORIGIN
#define CORS_ORIGIN "*"
#endif
#ifndef APP_VERSION
#define APP_VERSION "v1"
#endif
+1 -1
View File
@@ -160,7 +160,7 @@ void Spot::setupServer() {
#if defined(ENABLE_CORS)
ESP_LOGV(TAG, "Enabling CORS headers");
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", CORS_ORIGIN);
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Headers", "Accept, Content-Type, Authorization");
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Credentials", "true");
#endif