0

I'm just wondering why this plugin seems to be requesting a resource through http on a site that is fully https forced.

enter image description here

I am fully baffled on how this is happening seeing that there is no reference to http within the plugins code as far as I can see.

Essentially, my question is if there is a way to redirect this request to https somehow through magento as the XMLHTTPRquest seems to try request an unsecure piece of content.

  • Can you share the code where do you think its requesting that data from – Vishwas Bhatnagar Mar 18 '16 at 5:52
2
+100

The reason you didn't found http reference in plugin code is because they might be set AJAX request URL using Mage::getBase() or anything relevant to that.

However, you can quick fix this using prototype onCreate event handler. Put below code in your theme footer.phtml file:

<script type="text/javascript">
    Ajax.Responders.register({
            onCreate: function(request) {
                if (location.protocol === 'https:') {
                    request.url = request.url.replace("http:", "https:");
                }
            }
        });
</script>

What it does? This will bind event and triggered when prototype AJAX object has been created. It will verify your site URL, if it is https: then replace your AJAX URL with https:.

Please not that this is quick fix for your issue and applied to all of your AJAX request which is initialize through prototype.

Let me know if you have any query regarding this solution.

0

This come to form of Order Grid.
Essentialy check Magento -> Settings -> Web -> Secure. Check web Secure use in frontend to ENABLE. It's force all form to use https protocol. It's needed to enable, even if you force url in other places.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.