Skip to content

Commit 1b6815b

Browse files
committed
fix static cache header
1 parent 5c8a8c4 commit 1b6815b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rtjscomp",
3-
"version": "0.12.2",
3+
"version": "0.12.3",
44
"description": "php-like server but with javascript",
55
"repository": {
66
"type": "git",

rtjscomp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ const request_handle = async (request, response, https) => {
15611561
if (compression_enabled_type) {
15621562
response.setHeader('Vary', 'Accept-Encoding');
15631563
}
1564-
response.setHeader('Cache-Control', 'public, max-age=31536000');
1564+
response.setHeader('Cache-Control', 'public, max-age=600, stale-if-error=315360000');
15651565
response.setHeader('Last-Modified', new Date(file_stat.mtimeMs).toUTCString());
15661566

15671567
if (

0 commit comments

Comments
 (0)