1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-28 05:01:28 +03:00

Add ESP8266WebServerTemplate<ServerType>::enableCORS(bool _ec) (#7388)

Add ESP8266WebServerTemplate<ServerType>::enableCORS(bool _ec) like ESP32 Arduino platform.
This commit is contained in:
Mjxkill
2020-06-21 23:38:32 +02:00
committed by GitHub
parent 786a65402f
commit 7298691252
2 changed files with 13 additions and 1 deletions

View File

@ -99,6 +99,7 @@ public:
void serveStatic(const char* uri, fs::FS& fs, const char* path, const char* cache_header = NULL );
void onNotFound(THandlerFunction fn); //called when handler is not assigned
void onFileUpload(THandlerFunction fn); //handle file uploads
void enableCORS(bool enable);
const String& uri() const { return _currentUri; }
HTTPMethod method() const { return _currentMethod; }
@ -244,11 +245,14 @@ protected:
String _hostHeader;
bool _chunked;
bool _corsEnabled;
String _snonce; // Store noance and opaque for future comparison
String _sopaque;
String _srealm; // Store the Auth realm between Calls
};