Webhooks error message on ::1
-
I receive the following error when using the plugin on https://localhost when connecting via IPv6
Nets API Error: {"errors":{"notifications.WebHooks[0].Url":["Field is not accepted as a valid URL"]}}
Fix:
// diff.diff --- classes/requests/helpers/class-dibs-requests-get-notifications.php 2020-03-13 12:39:31.845641900 +0100 +++ classes/requests/helpers/class-dibs-requests-get-notifications.new.php 2020-03-13 12:39:27.228442700 +0100 @@ -12,9 +12,8 @@ public static function get_web_hooks() { $web_hooks = array(); - // Only set web hooks if host is not local. - if ( isset( $_SERVER['REMOTE_ADDR'] ) && '127.0.0.1' === $_SERVER['REMOTE_ADDR'] ) { + if ( isset( $_SERVER['REMOTE_ADDR'] ) && in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'] ) ) { return $web_hooks; } else { $web_hooks[] = array(
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Webhooks error message on ::1’ is closed to new replies.