From 5a69e5d88df6a787c8f1b5b5dd40e56d1c8d3729 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 20 Jan 2020 03:05:26 +0000 Subject: [PATCH] Improve nginx caching --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7555987..cacc2b2 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ server { add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Headers' 'content-type, authorization' always; add_header 'Access-Control-Allow-Methods' 'HEAD,GET,POST,PUT,PATCH,DELETE' always; - add_header 'Access-Control-Max-Age' '600' always; + add_header 'Access-Control-Max-Age' '86400' always; proxy_pass http://127.0.0.1:8002/; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; @@ -126,6 +126,7 @@ server { server_name static.example.com; location / { + add_header 'cache-control' 'max-age=2678400' always; try_files $uri $uri/ =404; } }