From 5c17408b205f24d03d91dfd439ffef28ff225145 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Thu, 8 Jun 2023 12:59:59 +0300 Subject: [PATCH] Use es6 function for headers --- http_server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_server.js b/http_server.js index 9ae2e2c80..5151fb24c 100755 --- a/http_server.js +++ b/http_server.js @@ -13,7 +13,7 @@ const build_path = path.resolve(__dirname, 'build'); const index_path = path.join(build_path, 'index.html'); express().use(express.static(build_path, { - setHeaders: function(res, path) { + setHeaders: (res, path) => { if (path === index_path) res.set('cache-control', `public, max-age: ${INDEX_CACHE}`); else res.set('cache-control', `public, max-age: ${ASSETS_CACHE}`); }