# One file for both the local rehearsal and the real deployment.
#
# SITE_ADDRESS=:80                  → plain HTTP, no certificate attempted
# SITE_ADDRESS=staging.shodh.net    → automatic HTTPS via Let's Encrypt
{$SITE_ADDRESS} {
	# Same origin for both, so the browser never makes a cross-origin request
	# and CORS cannot be the thing that breaks in production.
	handle /api/* {
		reverse_proxy api:8081
	}
	handle {
		reverse_proxy ui:3000
	}

	# Manuscript uploads go to 30 MB; the default would reject them.
	request_body {
		max_size 30MB
	}
}
