Nico Huber | 61433f3 | 2023-07-25 17:09:14 +0000 | [diff] [blame] | 1 | proxy_cache_path /var/cache/nginx/gerrit levels=2 keys_zone=GERRIT:1m inactive=1w max_size=16m; |
| 2 | |
| 3 | server { |
| 4 | listen 443 ssl; |
| 5 | listen [::]:443 ssl; |
| 6 | |
Nico Huber | 2a12889 | 2023-07-25 17:19:42 +0000 | [diff] [blame] | 7 | server_name review.${SA_PUBLIC_DOMAIN_NAME}; |
Nico Huber | 61433f3 | 2023-07-25 17:09:14 +0000 | [diff] [blame] | 8 | |
| 9 | location / { |
| 10 | proxy_pass http://gerrit:8080; |
| 11 | proxy_set_header X-Forwarded-For $remote_addr; |
| 12 | proxy_set_header Host $host; |
| 13 | |
| 14 | location ~ ^/(bower_components|elements|fonts|styles)/ { |
| 15 | proxy_pass http://gerrit:8080; |
| 16 | proxy_set_header X-Forwarded-For $remote_addr; |
| 17 | proxy_set_header Host $host; |
| 18 | proxy_cache GERRIT; |
| 19 | proxy_cache_valid 200 1h; |
| 20 | proxy_cache_use_stale error timeout invalid_header updating http_500 http_503; |
| 21 | # Gerrit bug sets `private`, hence the whole location override: |
| 22 | proxy_ignore_headers Cache-Control; |
| 23 | } |
| 24 | } |
| 25 | } |