Skip to content

Commit d572404

Browse files
bkosundunglas
andauthored
fix: do not handle requests to Mercure as PHP routes (#696)
Co-authored-by: Kévin Dunglas <[email protected]>
1 parent 12944cb commit d572404

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
name: Check HTTPS reachability
4646
if: false # Remove this line when the homepage will be configured, or change the path to check
4747
run: curl -vk --fail-with-body https://localhost
48+
-
49+
name: Check Mercure reachability
50+
run: curl -vkI --fail-with-body https://localhost/.well-known/mercure?topic=test
4851
-
4952
name: Create test database
5053
if: false # Remove this line if Doctrine ORM is installed

frankenphp/Caddyfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@
4444
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
4545
header ?Permissions-Policy "browsing-topics=()"
4646

47-
@phpRoute not file {path}
47+
@phpRoute {
48+
not path /.well-known/mercure*
49+
not file {path}
50+
}
4851
rewrite @phpRoute index.php
52+
4953
@frontController path index.php
5054
php @frontController
55+
5156
file_server
5257
}

0 commit comments

Comments
 (0)