Important: #106229 - Allow filtering request hosts in webhook messages
See forge#106229
Description
To protect against DNS rebinding, the list of allowed hostnames that webhook
handlers will connect to can be configured as a list in
$GLOBALS
.
To add a host to the allowlist, it can be appended to the mentioned array.
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['allowed_hosts']['webhooks'][] = 'example.com';
You can substitute parts of the domain with a wildcard character
'*'
(matches one or multiple characters, no regex syntax supported).
For example,
'*.
is valid, and accepts all domains ending in
.example.
, also foo.
:
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['allowed_hosts']['webhooks'][] = '*.example.com';
By default – when the webhooks
key in allowed_
is unset or null – all
hosts are allowed.
An empty array will cause all webhooks requests to be blocked:
// Block all webhook targets by specifying an empty array.
// You might better want to remove ext:webhooks if you want to do this.
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['allowed_hosts']['webhooks'] = [];