{{ baikal_domain }} {
	encode gzip

	@busy path /busy.ics
	handle @busy {
		@unauthorized not header X-Auberge-Busy-Token "{{ baikal_busy_feed_token }}"
		respond @unauthorized 403

		root * {{ baikal_busy_dir }}
		file_server
	}

	handle {
		root * {{ baikal_install_dir }}/html

		php_fastcgi unix/{{ baikal_fpm_socket }} {
			env SERVER_SOFTWARE Caddy
			env REQUEST_SCHEME https
		}

		file_server

		@forbidden {
			path /Specific/*
			path *.db
		}
		respond @forbidden 403
	}

	header {
		Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
		X-Content-Type-Options "nosniff"
		X-Frame-Options "SAMEORIGIN"
		Referrer-Policy "no-referrer"
	}

	request_body {
		max_size 100M
	}

	log {
		output file /var/log/caddy/{{ baikal_domain }}.log
		format filter {
			request>headers>X-Auberge-Busy-Token delete
		}
	}
}
