java2dev Posted October 13, 2016 Share Posted October 13, 2016 Hi , I have a plugin who sync some product, before I have to put some credentials to start matching and sinchronizing products.Everything works fine on localhost, but when I've done a test in a live prestashop website I had a problem to load data and checking the console brzser I found next error : Mixed content: The page was loaded over HTTPs, but requested an insecure XMLHttpRequest endpoint. This request has been blocked, the content must be served over HTTPs. Link to comment Share on other sites More sharing options...
java2dev Posted October 13, 2016 Author Share Posted October 13, 2016 I have this code, I don't know if is the issue, I'll change it to true and try again and let you know curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); Link to comment Share on other sites More sharing options...
java2dev Posted October 13, 2016 Author Share Posted October 13, 2016 it doesn't work .with this change(mentionned before) I've try to take the url and display it, what I'm taking is the http://url but what I see in url barre is https://url. Link to comment Share on other sites More sharing options...
java2dev Posted October 14, 2016 Author Share Posted October 14, 2016 I changed this //$base_url = Context::getContext()->shop->getBaseURL(); by this and it's work$base_url = Tools::getHttpHost(true).__PS_BASE_URI__; 1 Link to comment Share on other sites More sharing options...
Apium Posted October 16, 2016 Share Posted October 16, 2016 I assume $base_url is then used in some (inline) javascript code to make the request, right? Well, PrestaShop has the baseUri JS variable for that, so alternatively you could use that too . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now