Add cache header when serving a static file. Thanks to Vincent Bernardoff for sending a patch.

pull/30/head
Jeroen Domburg 10 years ago
parent 65a409dd23
commit bc6f84771e
  1. 1
      user/httpdespfs.c

@ -47,6 +47,7 @@ int ICACHE_FLASH_ATTR cgiEspFsHook(HttpdConnData *connData) {
connData->cgiData=file;
httpdStartResponse(connData, 200);
httpdHeader(connData, "Content-Type", httpdGetMimetype(connData->url));
httpdHeader(connData, "Cache-Control", "max-age=3600, must-revalidate");
httpdEndHeaders(connData);
return HTTPD_CGI_MORE;
}

Loading…
Cancel
Save