| proxy_cache_path /var/cache/nginx/gerrit levels=2 keys_zone=GERRIT:1m inactive=1w max_size=16m; |
| |
| server { |
| listen 443 ssl; |
| listen [::]:443 ssl; |
| |
| server_name review.${SA_PUBLIC_DOMAIN_NAME}; |
| |
| location / { |
| proxy_pass http://gerrit:8080; |
| proxy_set_header X-Forwarded-For $remote_addr; |
| proxy_set_header Host $host; |
| |
| location ~ ^/(bower_components|elements|fonts|styles)/ { |
| proxy_pass http://gerrit:8080; |
| proxy_set_header X-Forwarded-For $remote_addr; |
| proxy_set_header Host $host; |
| proxy_cache GERRIT; |
| proxy_cache_valid 200 1h; |
| proxy_cache_use_stale error timeout invalid_header updating http_500 http_503; |
| # Gerrit bug sets `private`, hence the whole location override: |
| proxy_ignore_headers Cache-Control; |
| } |
| } |
| } |