{
	admin off
}

:18901 {
	root * .

	# every path the OpenAPI doc declares is reachable same-origin:
	#   GET /            -> JSON index   (API)
	#   GET /health      -> {status:ok}  (API)
	#   GET/POST /pastes* -> view/raw/dl/create (API)
	#   /openapi.json    -> contract doc (served next to the client)
	# the SPA itself lives at /index.html (+ /client.js /styles.css /app.js)
	handle /pastes* {
		reverse_proxy 127.0.0.1:18900
	}
	handle /health {
		reverse_proxy 127.0.0.1:18900
	}
	@apiroot path /
	handle @apiroot {
		reverse_proxy 127.0.0.1:18900
	}
	file_server
}
