upstream explorer {
	server unix:/run/explorer/hypercorn.sock fail_timeout=0;
	keepalive 32;
}

server {
	listen 80;
	server_name testnet.explorer.dark.fi;

	access_log /var/log/nginx/explorer.access.log;
	error_log /var/log/nginx/explorer.error.log;

	add_header X-Frame-Options "SAMEORIGIN" always;
	add_header X-Content-Type-Options "nosniff" always;
	add_header X-XSS-Protection "1; mode=block" always;

	location / {
		proxy_pass http://explorer;
		proxy_redirect off;

		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;

		proxy_connect_timeout 60s;
		proxy_send_timeout 60s;
		proxy_read_timeout 60s;

		proxy_buffering on;
		proxy_buffer_size 4k;
		proxy_buffers 8 16k;
	}
}
