Expose cache header
This commit is contained in:
parent
baed1bbb2c
commit
85e28dbc3f
|
@ -46,6 +46,8 @@ location /docs {
|
||||||
location /skynet/blocklist {
|
location /skynet/blocklist {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
add_header X-Proxy-Cache $upstream_cache_status;
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache blocklist for 1 minute
|
proxy_cache_valid any 1m; # cache blocklist for 1 minute
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
|
@ -55,6 +57,8 @@ location /skynet/blocklist {
|
||||||
location /skynet/portal/blocklist {
|
location /skynet/portal/blocklist {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
add_header X-Proxy-Cache $upstream_cache_status;
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 15m; # cache portal blocklist for 15 minutes
|
proxy_cache_valid any 15m; # cache portal blocklist for 15 minutes
|
||||||
proxy_pass http://blocker:4000/blocklist;
|
proxy_pass http://blocker:4000/blocklist;
|
||||||
|
@ -63,6 +67,8 @@ location /skynet/portal/blocklist {
|
||||||
location /skynet/portals {
|
location /skynet/portals {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
add_header X-Proxy-Cache $upstream_cache_status;
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache portals for 1 minute
|
proxy_cache_valid any 1m; # cache portals for 1 minute
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
|
@ -72,6 +78,8 @@ location /skynet/portals {
|
||||||
location /skynet/stats {
|
location /skynet/stats {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
add_header X-Proxy-Cache $upstream_cache_status;
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache stats for 1 minute
|
proxy_cache_valid any 1m; # cache stats for 1 minute
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
|
@ -97,6 +105,8 @@ location /serverload {
|
||||||
location /skynet/health {
|
location /skynet/health {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
add_header X-Proxy-Cache $upstream_cache_status;
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_key $request_uri; # use whole request uri (uri + args) as cache key
|
proxy_cache_key $request_uri; # use whole request uri (uri + args) as cache key
|
||||||
proxy_cache_valid any 1m; # cache responses for 1 minute
|
proxy_cache_valid any 1m; # cache responses for 1 minute
|
||||||
|
|
Reference in New Issue