I was wondering if anyone has had to use NTLM authentication when using wp_remote_get
? Trying to authenticate using Basic but that is returning the proxy error. When I use other authenticators for different APIs that do use the Basic method, it works flawlessly!
Anyone got a solution for these?
I was wondering if anyone has had to use NTLM authentication when using wp_remote_get
? Trying to authenticate using Basic but that is returning the proxy error. When I use other authenticators for different APIs that do use the Basic method, it works flawlessly!
Anyone got a solution for these?
Share Improve this question asked Oct 15, 2019 at 5:58 markbmarkb 2996 silver badges18 bronze badges1 Answer
Reset to default 1In case anyone has issues like I did, I found this discussion where I added the code and instantly was authenticated. Not sure if its a Wordpress issue or a PHP one, but I feel that the ANY
portion of the Wordpress authentication was getting blocked first to find the Proxy type, but timing out. Adding the code from this link worked: https://core.trac.wordpress/ticket/31232#comment:7
add_action( 'http_api_curl', function( $handle ) {
curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC );
});
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745074560a4609755.html
评论列表(0条)