Plugin Directory

Changeset 2167637


Ignore:
Timestamp:
10/03/2019 01:20:05 PM (6 years ago)
Author:
runcloud
Message:

fixed bug hook http_api_curl resolve other hosts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • runcache-purger/trunk/runcache-purger.php

    r2159577 r2167637  
    55 * Plugin URI:      https://wordpress.org/plugins/runcache-purger/
    66 * Description:     This plugin will purge RunCloud.io NGINX fastcgi, Proxy Cache and Redis Object Cache.
    7  * Version:         1.11.0
     7 * Version:         1.11.1
    88 * Author:          RunCloud
    99 * Author URI:      https://runcloud.io/
     
    6464
    6565    // version
    66     private static $version      = '1.11.0';
    67     private static $version_prev = '1.10.0';
     66    private static $version      = '1.11.1';
     67    private static $version_prev = '1.11.0';
    6868
    6969    // later
     
    866866        add_action('http_api_curl', function ($handle, $r, $url) {
    867867
     868            $myhost = parse_url(get_site_url(), PHP_URL_HOST);
     869
    868870            $url_host   = parse_url($url, PHP_URL_HOST);
    869871            $url_scheme = parse_url($url, PHP_URL_SCHEME);
    870872            $url_port   = parse_url($url, PHP_URL_PORT);
     873
     874            // 03102019
     875            if ( $myhost !== $url_host ) {
     876                return;
     877            }
    871878
    872879            $port = 80;
Note: See TracChangeset for help on using the changeset viewer.