Permalinks: Detect FrankenPHP web server support.

Support pretty permalinks when FrankenPHP server is detected, which is built on top of Caddy. Caddy detection was added in [57612].

Props swissspidy, stephenmiracle.
Fixes #60884.

git-svn-id: https://develop.svn.wordpress.org/trunk@57923 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2024-04-04 13:37:56 +00:00
parent 89bd74fea1
commit 554f5b5723

View File

@ -127,11 +127,11 @@ $is_apache = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) || str_cont
$is_nginx = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) );
/**
* Whether the server software is Caddy or something else.
* Whether the server software is Caddy / FrankenPHP or something else.
*
* @global bool $is_caddy
*/
$is_caddy = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Caddy' ) );
$is_caddy = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Caddy' ) || str_contains( $_SERVER['SERVER_SOFTWARE'], 'FrankenPHP' ) );
/**
* Whether the server software is IIS or something else.