Files
php-qml/framework/skeleton/Caddyfile
magdev 3c027255c8 caddyfile: apply caddy fmt — silence "input is not formatted" warning
FrankenPHP logs a warning on every boot:

  Caddyfile input is not formatted; run 'caddy fmt --overwrite' to
  fix inconsistencies

Cosmetic but clutters the dev console (and the bundled-mode logs).
The actual diff is one blank line in each file: caddy fmt rejects an
empty line between a leading comment and the `{` global-options
block. tests/var/Caddyfile was already clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 13:14:22 +02:00

40 lines
1.1 KiB
Caddyfile

# php-qml framework skeleton — FrankenPHP / Caddy / Mercure config.
#
# Works in both run modes:
# - dev mode → env unset, defaults below match symfony/.env
# - bundled mode → BackendConnection sets PORT and MERCURE_*_JWT_KEY
# before launching FrankenPHP.
#
# Caddyfile {$VAR:default} syntax substitutes env vars at parse time.
{
auto_https off
admin off
frankenphp
order php_server before respond
order mercure after encode
}
http://127.0.0.1:{$PORT:8765} {
root * public/
encode gzip
mercure {
transport local
# In bundled mode the host generates a fresh per-session JWT;
# in dev mode we fall back to the value from symfony/.env (must
# match it). lcobucci/jwt requires ≥256 bits.
publisher_jwt {$MERCURE_PUBLISHER_JWT_KEY:dev_php_qml_bridge_jwt_secret_at_least_256_bits_long_for_lcobucci}
subscriber_jwt {$MERCURE_SUBSCRIBER_JWT_KEY:dev_php_qml_bridge_jwt_secret_at_least_256_bits_long_for_lcobucci}
anonymous
publish_origins *
cors_origins *
}
php_server
log {
output stderr
format console
}
}