From d572404fa3b6b73abc729897be4fbcafd0725780 Mon Sep 17 00:00:00 2001 From: Borislav Kosun Date: Mon, 18 Nov 2024 15:59:53 +0200 Subject: [PATCH] fix: do not handle requests to Mercure as PHP routes (#696) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kévin Dunglas --- .github/workflows/ci.yml | 3 +++ frankenphp/Caddyfile | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d950ba3f..8b0f691fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,9 @@ jobs: name: Check HTTPS reachability if: false # Remove this line when the homepage will be configured, or change the path to check run: curl -vk --fail-with-body https://localhost + - + name: Check Mercure reachability + run: curl -vkI --fail-with-body https://localhost/.well-known/mercure?topic=test - name: Create test database if: false # Remove this line if Doctrine ORM is installed diff --git a/frankenphp/Caddyfile b/frankenphp/Caddyfile index 997774b34..573219c74 100644 --- a/frankenphp/Caddyfile +++ b/frankenphp/Caddyfile @@ -44,9 +44,14 @@ # Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics header ?Permissions-Policy "browsing-topics=()" - @phpRoute not file {path} + @phpRoute { + not path /.well-known/mercure* + not file {path} + } rewrite @phpRoute index.php + @frontController path index.php php @frontController + file_server }