diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 9517ba41..243e201c 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -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;" }} {{ $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_req_zone $binary_remote_addr zone=req_zone:10m rate=20r/s; @@ -42,12 +40,11 @@ server { {{ $proxy_settings }} {{ $gzip_settings }} - proxy_cache my_cache; - proxy_cache_revalidate on; - proxy_cache_min_uses 2; - proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; - proxy_cache_background_update on; - proxy_cache_lock on; + # Disable caching for GraphQL API + proxy_cache off; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires "0"; # Connections and request limits increase (bad for DDos) limit_req zone=req_zone burst=10 nodelay;