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; }