Browse Source

Added Last-Modified header to static contents

fastled
Xose Pérez 8 years ago
parent
commit
afe8defa4c
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      code/src/web.ino

+ 4
- 2
code/src/web.ino View File

@ -499,8 +499,10 @@ void webSetup() {
server.on("/api/relay", HTTP_GET, _onRelay);
// Serve static files
server.serveStatic("/", SPIFFS, "/");
char lastModified[50];
sprintf(lastModified, "%s %s GMT", __DATE__, __TIME__);
server.serveStatic("/", SPIFFS, "/").setLastModified(lastModified);
// 404
server.onNotFound([](AsyncWebServerRequest *request){
request->send(404);


Loading…
Cancel
Save