mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Add Server to HTTP header (#10831)
This commit is contained in:
parent
d5542b1a66
commit
607654297b
@ -742,7 +742,11 @@ String GetDeviceHardware(void)
|
||||
}
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
#if CONFIG_IDF_TARGET_ESP32S2 // ESP32-S2
|
||||
strcpy_P(buff, PSTR("ESP32-S2"));
|
||||
#else
|
||||
strcpy_P(buff, PSTR("ESP32"));
|
||||
#endif // CONFIG_IDF_TARGET_ESP32S2
|
||||
#endif // ESP32
|
||||
return String(buff);
|
||||
}
|
||||
|
@ -573,6 +573,9 @@ void HttpHeaderCors(void)
|
||||
|
||||
void WSHeaderSend(void)
|
||||
{
|
||||
char server[32];
|
||||
snprintf_P(server, sizeof(server), PSTR("Tasmota/%s (%s)"), TasmotaGlobal.version, GetDeviceHardware().c_str());
|
||||
Webserver->sendHeader(F("Server"), server);
|
||||
Webserver->sendHeader(F("Cache-Control"), F("no-cache, no-store, must-revalidate"));
|
||||
Webserver->sendHeader(F("Pragma"), F("no-cache"));
|
||||
Webserver->sendHeader(F("Expires"), F("-1"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user