blob: f25213ca95131edb262fac93eda1fef568dde3fe [file] [log] [blame]
Nico Huber61433f32023-07-25 17:09:14 +00001proxy_cache_path /var/cache/nginx/gerrit levels=2 keys_zone=GERRIT:1m inactive=1w max_size=16m;
2
3server {
4 listen 443 ssl;
5 listen [::]:443 ssl;
6
Nico Huber2a128892023-07-25 17:19:42 +00007 server_name review.${SA_PUBLIC_DOMAIN_NAME};
Nico Huber61433f32023-07-25 17:09:14 +00008
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}