Add a directive for loading `ini`files
Describe you feature request
Is your feature request related to a problem? Please describe. I have the following configuration:
{
frankenphp
order php_server before file_server
log {
level DEBUG
}
}
:443 {
tls /cert/_wildcard.orb.local.pem /cert/_wildcard.orb.local-key.pem
root * {$PUBLIC_DIR:/app/public}
@has_xdebug_cookie header Cookie *XDEBUG_SESSION*
route @has_xdebug_cookie {
php_server {
env XDEBUG_MODE "debug" <---- it doesn't work here :(
}
}
route {
php_server
}
}
To improve performance while developing an app, I'd like to provide a conditional xdebug enabling. I've noticed the XDebug Helper sets the XDEBUG_SESSION cookie. So, I know when I should do something (enable XDebug). However, I've noticed the only way to provide an additional .ini file is by setting an environment variable, which is not possible for me. I'm not sure if it is possible, but it would be great if I could provide an extra .ini file as a directive instead of an environment variable.
Describe the solution you'd like Something like:
...
route @has_xdebug_cookie {
php_server {
ini "some_path_to_my.ini"
}
}
...
Describe alternatives you've considered n/a
Good idea. We could even support setting INI directives directly in the Caddyfile.
Great to hear! 🥳 I can't wait to see the PR, as I was looking into the source of Franken, but it's magic for me (yet) ✨.