Remove CLI environment check
Removes the early return when in CLI context. Background:
When in CLI context, e.g. when sending fluid emails with absolute uri's, we can fake the HTTP_HOST by adding it to the cli call: HTTP_HOST=domain.tld REQUEST_URI=/ php vendor/bin/typo3 my:command
It's a workaround but I need this and this early returns prevents matching the host which then prevents finding the base urls which then prevents creating absolute uris.
Thanks for the PR. So I guess we should rather check if we have a HTTP_HOST set?
I am not sure if it actually matters if a host is set.
GeneralUtility::getIndpEnv('HTTP_HOST')
returns an empty string if it's not set in $_SERVER and the comparison returns false then. Do we need an early return and skip the comparion at all?
Hi,
any opinion on this one? I have this running in a prod site for months now and don't see any issues with it.
HI, Alex. I have alook today at your two MRs and test this again, I think we had an issue with this in CLI, but maybe in one of the older TYPO3 version. Maybe we remove the check and drop support for v9 and v10 in a new release, so I can test it in v11, v12 and v13.
Thanks for the MR, I tested it and released a new version for TYPO3 11-13