Closed jnweaver closed 6 years ago
Does changing
$page_url = esc_url( home_url( $wp->request ) );
to this work too for you?
$page_url = esc_url( $this->the_home_url() . $wp->request );
Yes, that's better. It does work. I've updated the PR.
I did have to adjust my vhp_home_url
filter to pass the trailing slash but I maybe should have done that before anyway.
Maybe there's another way around this but I don't see it.
I have a Wordpress instance running on two different domains: admin.my.domain and my.domain. Varnish sits in front of my.domain.
I use the the
vhp_home_url
to filterthe_home_url()
to my.domain.However, because
varnish_rightnow_adminbar()
builds the Purge Cache (This Page) URL usinghome_url( $wp->request )
that URL ends up being admin.my.domain/$wp->request. This PR does a string replacement using$this->the_home_url()
. If novhp_home_url()
is set, the result should be the same as callinghome_url( $wp->request )
. But if one is set, then the URL to clear the current page will be corrected to the filtered vhp_home_url.Thanks for considering.