Previous match had a missing line, this one should work
After version 2.3 the previous patch is failing. This new version should work.
This version is better because as I said in previous comment you might be using patches from
https://www.drupal.org/project/varnish_purge/issues/2843978
✨
Multiple IP's for one varnish purger
Needs review
to get the very much expected feature of defining several front varnish servers for one purger (via array or space separated string).
If you do not use these patches this current patch will still work as expected.
There's one problem with this patch. Duplication of requests when you have multiple purgers defined targeting the same backend.
The patch code is parsing all purgers and adding the varnish hosts of each purger to duplicate the requests, which seems OK at first. It's better than the current code trying to reach the main domain (especially on complex installations where you have better chances to reach varnish by an internal name instead of using the main domain for purge requests).
But if you have multiple purgers defined in varnish_purge, like when you use 'wildcard paths' purgers, and 'tags' purger, and some others.
These various purgers may reference the exact same varnish server. Then you would duplicate several the URIBAN requests, targeting the exact same Varnish backend. So we need to add a deduplication on the scheme+host+port list of varnish servers.
There's a second problem if you use the patches from https://www.drupal.org/project/varnish_purge/issues/2843978 ✨ Multiple IP's for one varnish purger Needs review to allow multiple varnish servers to be referenced in each purger. But I'll make another comment soon for another version of the patch in that case (that should be using the `getUris()` function added in these patch).