If the url option is configured as array, Kirby only checks the hostnames that are contained in these configured allowed URLs. If the configured URLs contain paths, these are neither checked nor used for the system index URL.
Expected behavior
The Environment should match the full detected index URL against the configured array, not just the hostname. If the path is invalid, no match will be found and the exception should be thrown.
Description
If the
url
option is configured as array, Kirby only checks the hostnames that are contained in these configured allowed URLs. If the configured URLs contain paths, these are neither checked nor used for the system index URL.Expected behavior
The
Environment
should match the full detected index URL against the configured array, not just the hostname. If the path is invalid, no match will be found and the exception should be thrown.Additional context
The issue comes from this line:
https://github.com/getkirby/kirby/blob/e891e3e517551e04facd52a90d6e7e474a8f992b/src/Cms/Environment.php#L85
The full
$url
is basically thrown away at this point.To reproduce
config.php
:Actual (detected) index URL:
http://localhost/my-actual-path
Code in any template:
Output:
Your setup
Kirby Version
3.6.3-rc.1