blob: b5c826d02524edf1c9072114c929e6481df3e451 [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
7 server_name review.miau.local;
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}