feat: 导入 MemRelay 初始源码
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
location ^~ /assets/ {
|
||||
proxy_pass http://127.0.0.1:52001;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header Connection "";
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_cache memrelay_assets;
|
||||
proxy_cache_methods GET HEAD;
|
||||
proxy_cache_valid 200 30d;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_lock_timeout 120s;
|
||||
proxy_cache_lock_age 120s;
|
||||
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||
proxy_cache_background_update on;
|
||||
proxy_ignore_headers Expires Cache-Control Set-Cookie;
|
||||
proxy_hide_header Set-Cookie;
|
||||
|
||||
add_header X-Cache $upstream_cache_status always;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
proxy_cache_path /www/sites/memrelay/cache
|
||||
levels=1:2
|
||||
keys_zone=memrelay_assets:10m
|
||||
max_size=256m
|
||||
inactive=30d
|
||||
use_temp_path=off;
|
||||
Reference in New Issue
Block a user