This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
{{ $proxy_settings := "proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header Host $http_host; proxy_set_header X-Request-Start $msec;" }}
|
{{ $proxy_settings := "proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header Host $http_host; proxy_set_header X-Request-Start $msec;" }}
|
||||||
{{ $gzip_settings := "gzip on; gzip_min_length 1100; gzip_buffers 4 32k; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml; gzip_vary on; gzip_comp_level 6;" }}
|
{{ $gzip_settings := "gzip on; gzip_min_length 1100; gzip_buffers 4 32k; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml; gzip_vary on; gzip_comp_level 6;" }}
|
||||||
|
|
||||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;
|
|
||||||
limit_conn_zone $binary_remote_addr zone=addr:10m;
|
limit_conn_zone $binary_remote_addr zone=addr:10m;
|
||||||
limit_req_zone $binary_remote_addr zone=req_zone:10m rate=20r/s;
|
limit_req_zone $binary_remote_addr zone=req_zone:10m rate=20r/s;
|
||||||
|
|
||||||
@@ -42,12 +40,11 @@ server {
|
|||||||
{{ $proxy_settings }}
|
{{ $proxy_settings }}
|
||||||
{{ $gzip_settings }}
|
{{ $gzip_settings }}
|
||||||
|
|
||||||
proxy_cache my_cache;
|
# Disable caching for GraphQL API
|
||||||
proxy_cache_revalidate on;
|
proxy_cache off;
|
||||||
proxy_cache_min_uses 2;
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||||
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
add_header Pragma "no-cache";
|
||||||
proxy_cache_background_update on;
|
add_header Expires "0";
|
||||||
proxy_cache_lock on;
|
|
||||||
|
|
||||||
# Connections and request limits increase (bad for DDos)
|
# Connections and request limits increase (bad for DDos)
|
||||||
limit_req zone=req_zone burst=10 nodelay;
|
limit_req zone=req_zone burst=10 nodelay;
|
||||||
|
Reference in New Issue
Block a user