Skip to content

Commit

Permalink
fix: do not handle requests to Mercure as PHP routes (#696)
Browse files Browse the repository at this point in the history
Co-authored-by: Kévin Dunglas <[email protected]>
  • Loading branch information
bkosun and dunglas authored Nov 18, 2024
1 parent 12944cb commit d572404
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion frankenphp/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d572404

Please sign in to comment.