bfi_thumb icon indicating copy to clipboard operation
bfi_thumb copied to clipboard

Doesn't work on https

Open darkolaz opened this issue 9 years ago • 1 comments

Hello,

I have issue with bfi_thumb under secure domain. Everything works very well when the website is open normally and not forced under https. When i try to get the bfi_thumb url it returns the original url and ignoring the bfi_thumb parameters.

darkolaz avatar Dec 25 '16 15:12 darkolaz

After debagging i found out that $upload_url = $upload_info['baseurl'] is always http. The problem is in wp_upload_url(), it's not working like it's supposed to.

I simply added this on line 404 and my problem was solved:

if($_SERVER['SERVER_PORT'] == '443' && strpos( $upload_url, 'https' ) === false){ $upload_url = str_replace('http', 'https', $upload_url); }

darkolaz avatar Dec 25 '16 16:12 darkolaz