added SSL to schema filter
added SSL to schema filter

file:a/readme.txt -> file:b/readme.txt
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@
 Tags: varnish, purge, cache, caching, optimization, performance, traffic
 Requires at least: 4.0
 Tested up to: 4.8
-Stable tag: 1.6.2
+Stable tag: 1.6.3
 License: GPLv2 or later
 
 Wordpress Varnish Cache 3.x/4.x/5.x integration
@@ -116,6 +116,9 @@
 
 == Changelog ==
 
+= 1.6.3 =
+* added SSL to schema filter. thanks @Jules81
+
 = 1.6.2 =
 * fixed purge_post empty 2nd param
 

--- a/vcaching.php
+++ b/vcaching.php
@@ -3,7 +3,7 @@
 Plugin Name: Varnish Caching
 Plugin URI: http://wordpress.org/extend/plugins/vcaching/
 Description: WordPress Varnish Cache integration.
-Version: 1.6.2
+Version: 1.6.3
 Author: Razvan Stanga
 Author URI: http://git.razvi.ro/
 License: http://www.apache.org/licenses/LICENSE-2.0
@@ -388,7 +388,7 @@
             $path = '';
         }
 
-        $schema = apply_filters('vcaching_schema', 'http://');
+        $schema = apply_filters('vcaching_schema', is_ssl() ? 'https://' : 'http://');
 
         foreach ($this->ipsToHosts as $key => $ipToHost) {
             $purgeme = $schema . $ipToHost['ip'] . $path . $pregex;

comments