{
	admin off
	auto_https off
	persist_config off
}

:8080 {
	root * /srv
	encode zstd gzip
	header {
		Cross-Origin-Opener-Policy "same-origin"
		Cross-Origin-Embedder-Policy "credentialless"
		# libvips' Emscripten glue requires JavaScript eval as well as WebAssembly.
		Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; worker-src 'self' blob:; connect-src 'self' blob: data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src 'self' blob: data:; media-src 'self' blob: data:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'self'"
		Referrer-Policy "no-referrer"
		X-Content-Type-Options "nosniff"
		X-Frame-Options "DENY"
		Permissions-Policy "camera=(), microphone=(), geolocation=()"
	}
	@immutable path /_app/immutable/*
	header @immutable Cache-Control "public, max-age=31536000, immutable"
	handle /healthz {
		respond "ok" 200
	}
	handle {
		try_files {path} {path}.html {path}/index.html /index.html
		file_server
	}
}
