blob: b5c826d02524edf1c9072114c929e6481df3e451 [file] [log] [blame]
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.miau.local;
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;
}
}
}