Proxy settings for curl
-
Hi,
The server hosting my websites is behind a proxy and I had to configure WordPress to access the internet (WP_PROXY_HOST and WP_PROXY_PORT constants are defined in my wp-config.php file).Wordfence is unable to update the firewall rules and says :
“Rule Update Failed
No rules were updated. Please verify you have permissions to write to the /wp-content/wflogs directory.”The permissions are OK but I found that Wordfence does not seems to use the WP proxy parameters.
In the wfWAFHTTPTransportCurl class (vendor/wordfence/wf-waf/src/lib/httpd.php) I found the comment “@todo Proxy settings” ??
I just added these lines before $curlResponse = curl_exec($ch) :
if (defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT')) { curl_setopt($ch, CURLOPT_PROXY, WP_PROXY_HOST.":".WP_PROXY_PORT); }
and the rules update works well now! But I can’t do that since the next update will erase the code I added…
Do you plan to support the proxy settings in the near future?
- The topic ‘Proxy settings for curl’ is closed to new replies.