Version Description
- September 2018
- Bugfix to allow Nginx proxy to flush individual pages.
Download this release
Release Info
Developer | Ipstenu |
Plugin | Varnish HTTP Purge |
Version | 4.6.6 |
Comparing to | |
See all releases |
Code changes from version 4.6.5 to 4.6.6
- readme.txt +5 -1
- varnish-http-purge.php +9 -3
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ipstenu, mikeschroder, techpriester, danielbachhuber
|
|
3 |
Tags: varnish, purge, cache
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 4.6.
|
7 |
Requires PHP: 5.6
|
8 |
|
9 |
Automatically empty Varnish Cache when content on your site is modified.
|
@@ -188,6 +188,10 @@ This plugin is installed by default for _all_ DreamPress installs on DreamHost,
|
|
188 |
|
189 |
== Changelog ==
|
190 |
|
|
|
|
|
|
|
|
|
191 |
= 4.6.5 =
|
192 |
* September 2018
|
193 |
* Bugfix to correct footer output. :facepalm: No broken functionality.
|
3 |
Tags: varnish, purge, cache
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 4.6.6
|
7 |
Requires PHP: 5.6
|
8 |
|
9 |
Automatically empty Varnish Cache when content on your site is modified.
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
+
= 4.6.6 =
|
192 |
+
* September 2018
|
193 |
+
* Bugfix to allow Nginx proxy to flush individual pages.
|
194 |
+
|
195 |
= 4.6.5 =
|
196 |
* September 2018
|
197 |
* Bugfix to correct footer output. :facepalm: No broken functionality.
|
varnish-http-purge.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Varnish HTTP Purge
|
4 |
* Plugin URI: https://halfelf.org/plugins/varnish-http-purge/
|
5 |
* Description: Automatically empty cached pages when content on your site is modified.
|
6 |
-
* Version: 4.6.
|
7 |
* Author: Mika Epstein
|
8 |
* Author URI: https://halfelf.org/
|
9 |
* License: http://www.apache.org/licenses/LICENSE-2.0
|
@@ -35,7 +35,7 @@ class VarnishPurger {
|
|
35 |
* Version Number
|
36 |
* @var string
|
37 |
*/
|
38 |
-
public static $version = '4.6.
|
39 |
|
40 |
/**
|
41 |
* List of URLs to be purged
|
@@ -609,6 +609,12 @@ class VarnishPurger {
|
|
609 |
$host_headers .= ':' . $p['port'];
|
610 |
}
|
611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
// Create path to purge.
|
613 |
$purgeme = $schema . $host . $path . $pregex;
|
614 |
|
@@ -631,7 +637,7 @@ class VarnishPurger {
|
|
631 |
'headers' => $headers,
|
632 |
) );
|
633 |
|
634 |
-
do_action( 'after_purge_url', $
|
635 |
}
|
636 |
|
637 |
/**
|
3 |
* Plugin Name: Varnish HTTP Purge
|
4 |
* Plugin URI: https://halfelf.org/plugins/varnish-http-purge/
|
5 |
* Description: Automatically empty cached pages when content on your site is modified.
|
6 |
+
* Version: 4.6.6
|
7 |
* Author: Mika Epstein
|
8 |
* Author URI: https://halfelf.org/
|
9 |
* License: http://www.apache.org/licenses/LICENSE-2.0
|
35 |
* Version Number
|
36 |
* @var string
|
37 |
*/
|
38 |
+
public static $version = '4.6.6';
|
39 |
|
40 |
/**
|
41 |
* List of URLs to be purged
|
609 |
$host_headers .= ':' . $p['port'];
|
610 |
}
|
611 |
|
612 |
+
$parsed_url = $url;
|
613 |
+
// Filter URL based on the Proxy IP for nginx compatibility
|
614 |
+
if ( 'localhost' === $proxy_ip ) {
|
615 |
+
$parsed_url = str_replace( $p['host'], 'localhost', $parsed_url );
|
616 |
+
}
|
617 |
+
|
618 |
// Create path to purge.
|
619 |
$purgeme = $schema . $host . $path . $pregex;
|
620 |
|
637 |
'headers' => $headers,
|
638 |
) );
|
639 |
|
640 |
+
do_action( 'after_purge_url', $parsed_url, $purgeme, $response, $headers );
|
641 |
}
|
642 |
|
643 |
/**
|