🎨 Inlines cors wildcard
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user