Created
November 15, 2022 04:55
-
-
Save offbyone/510f203318d563784ebe93215899e9f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ ^/users/([^/]+)$ { | |
proxy_cache static-cache; | |
proxy_cache_key "$scheme$host$request_uri$http_accept"; | |
proxy_cache_valid 200 1h; | |
proxy_cache_valid 410 7d; | |
proxy_cache_valid 404 30m; | |
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504; | |
# proxy_cache_bypass $http_x_purge; # you may not want this to mitigate potential attacks | |
add_header X-Cache-Status $upstream_cache_status; | |
proxy_pass http://127.0.0.1:3000; | |
proxy_buffering off; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
tcp_nodelay on; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment