From c74e8ed70e9eaccaf67e96b4e090a9316a051754 Mon Sep 17 00:00:00 2001 From: Borislav Kosun Date: Sat, 16 Nov 2024 22:54:23 +0200 Subject: [PATCH 1/4] ci: add Mercure reachability check --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d950ba3f..be36ccd47 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= - name: Create test database if: false # Remove this line if Doctrine ORM is installed From d93a29a2841f2ff8881799c446b7d2266ebcd7d2 Mon Sep 17 00:00:00 2001 From: Borislav Kosun Date: Sat, 16 Nov 2024 23:01:27 +0200 Subject: [PATCH 2/4] fix: do not handle requests to Mercure as PHP routes --- frankenphp/Caddyfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frankenphp/Caddyfile b/frankenphp/Caddyfile index 997774b34..809c0583f 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 file {path} + not path /.well-known/mercure + } rewrite @phpRoute index.php + @frontController path index.php php @frontController + file_server } From 78f118bad5b0c672bbc3778e93bd35cee04c82c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 18 Nov 2024 14:47:09 +0100 Subject: [PATCH 3/4] fix: match all Mercure pathes --- frankenphp/Caddyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frankenphp/Caddyfile b/frankenphp/Caddyfile index 809c0583f..573219c74 100644 --- a/frankenphp/Caddyfile +++ b/frankenphp/Caddyfile @@ -45,8 +45,8 @@ header ?Permissions-Policy "browsing-topics=()" @phpRoute { + not path /.well-known/mercure* not file {path} - not path /.well-known/mercure } rewrite @phpRoute index.php From d61930ec542d17c4f5efbd4f8e485983b8cefa12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 18 Nov 2024 14:50:43 +0100 Subject: [PATCH 4/4] fix: test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be36ccd47..8b0f691fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: run: curl -vk --fail-with-body https://localhost - name: Check Mercure reachability - run: curl -vkI --fail-with-body https://localhost/.well-known/mercure?topic= + 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