From 1a5b8f7fad440c37544c50925d6fee4c373b25cd Mon Sep 17 00:00:00 2001 From: Bogdan Pilyugin Date: Thu, 7 Sep 2023 12:43:44 +0200 Subject: [PATCH] fixed and improver http server all files headers now have cash-control with age 600 removed limit to 3 http sockets number, now use dwfault 7 --- src/HTTPServer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/HTTPServer.c b/src/HTTPServer.c index 8a041d2..7f004fe 100644 --- a/src/HTTPServer.c +++ b/src/HTTPServer.c @@ -371,10 +371,13 @@ static esp_err_t GETHandler(httpd_req_t *req) if (memmem(buf, 3, GZIP_SIGN, 3)) { httpd_resp_set_hdr(req, "Content-Encoding", "gzip"); - httpd_resp_set_hdr(req, "Cache-Control", "max-age=600"); + //httpd_resp_set_hdr(req, "Cache-Control", "max-age=600"); isDynamicVars = false; } + isDynamicVars = false; + httpd_resp_set_hdr(req, "Cache-Control", "max-age=600"); + do { int pt = 0; @@ -491,9 +494,9 @@ static httpd_handle_t start_webserver(void) { httpd_handle_t server = NULL; httpd_config_t config = HTTPD_DEFAULT_CONFIG(); - config.lru_purge_enable = true; + // config.lru_purge_enable = true; config.uri_match_fn = httpd_uri_match_wildcard; - config.max_open_sockets = 3; + // config.max_open_sockets = 3; config.stack_size = (4096 + 1024); // Start the httpd server