mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Use webServer.uri() in httpIsAuthenticated instead of fixed strings
This commit is contained in:
parent
5417f8d24a
commit
50fb1e0cce
@ -233,12 +233,13 @@ bool httpIsAuthenticated()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool httpIsAuthenticated(const __FlashStringHelper* fstr_page)
|
bool httpIsAuthenticated(const __FlashStringHelper* notused)
|
||||||
{
|
{
|
||||||
if(!httpIsAuthenticated()) return false;
|
if(!httpIsAuthenticated()) return false;
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
||||||
LOG_TRACE(TAG_HTTP, F(D_HTTP_SENDING_PAGE), fstr_page, webServer.client().remoteIP().toString().c_str());
|
LOG_TRACE(TAG_HTTP, F(D_HTTP_SENDING_PAGE), webServer.uri().c_str(),
|
||||||
|
webServer.client().remoteIP().toString().c_str());
|
||||||
#else
|
#else
|
||||||
// LOG_INFO(TAG_HTTP,F(D_HTTP_SENDING_PAGE), page,
|
// LOG_INFO(TAG_HTTP,F(D_HTTP_SENDING_PAGE), page,
|
||||||
// String(webServer.client().remoteIP()).c_str());
|
// String(webServer.client().remoteIP()).c_str());
|
||||||
@ -263,7 +264,7 @@ void webSendFooter()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int webSendCached(int statuscode, char* contenttype, char* data, size_t size)
|
static int webSendCached(int statuscode, const char* contenttype, const char* data, size_t size)
|
||||||
{
|
{
|
||||||
webServer.sendHeader(F("Cache-Control"), F("public, max-age=604800, immutable"));
|
webServer.sendHeader(F("Cache-Control"), F("public, max-age=604800, immutable"));
|
||||||
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user