fix: forwards php_server root to try_files by AlliBalliBaba · Pull Request #1729 · php/frankenphp
Should fix #1723
The root defined in php_server was never really forwarded to try_files, which led to potentially confusing behavior where the file_server root (coming from php_server) and the try_files root (coming from the caddy route) would differ.
This behavior is probably also broken in the php_fast_cgi implementation
| TryFiles: tryFiles, | ||
| TryPolicy: tryPolicy, | ||
| SplitPath: extensions, | ||
| Root: phpsrv.Root, |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one question though because I currently can't test it - this still falls back to Caddy's root if the one in phpsrv is empty?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it will fallback, an empty string is the default in the struct (otherwise tests would also fail)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add some more tests for all cases
Hmm not sure if this is also an issue upstream since the file_server is not built in in that case. Would need to actually test with an actual installation.
dunglas
deleted the
fix/php-server-root
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters