# Caddyfile — Navidrome con Authentik (configuración recomendada)

navidrome.example.com {

	#  API / STREAMS - SIN Authentik
	handle /rest/* {
		route {
			reverse_proxy http://127.0.0.1:4533
		}
	}

	handle /share/* {
		route {
			reverse_proxy http://127.0.0.1:4533
		}
	}

	handle /subsonic/* {
		route {
			reverse_proxy http://127.0.0.1:4533
		}
	}

	# UI WEB - CON Authentik
	handle {
		route {
			# Forward auth / Authentik
			# (ajusta esto a tu integración concreta)
			import authentik

			reverse_proxy http://127.0.0.1:4533
		}
	}
}
