JSONP Cross Domain via HTTPS

I use JSONP over HTTP in different domains (say http://a.com and http://b.com ) for messaging.

It works great. My question is if I switch both host protocols to HTTPS even though they are in different domains. Will they continue to work fine without warning a pop-up warning in IE6?

thanks

+4
source share
1 answer

Yes, he will continue to work. Changing the protocol is the same effect as changing any other part of the URL - it will violate the policy of the same origin and will lead you to cross-domain mode. If you already have access to cross-domain access, it will continue to work with https, as well as with http.

Please note that you still have to deal with a situation where one or both of your secure sites have invalid credentials. If you try to execute the AJAX method at a secure URL with a certificate with no hope or expired, the browser will warn the user about it no matter how and what you are trying to do.

+3
source

Source: https://habr.com/ru/post/1369132/


All Articles