Merge pull request #3508 from Moustachauve/fix-settings-cache

Fix settings caching on some browsers
pull/3536/head
Blaž Kristan 2023-11-17 08:48:21 +01:00 zatwierdzone przez GitHub
commit a83d9a075f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -545,7 +545,12 @@ void serveSettingsJS(AsyncWebServerRequest* request)
strcat_P(buf,PSTR("function GetV(){var d=document;"));
getSettingsJS(subPage, buf+strlen(buf)); // this may overflow by 35bytes!!!
strcat_P(buf,PSTR("}"));
request->send(200, "application/javascript", buf);
AsyncWebServerResponse *response;
response = request->beginResponse(200, "application/javascript", buf);
response->addHeader(F("Cache-Control"),"no-store");
response->addHeader(F("Expires"),"0");
request->send(response);
}