Search code examples
javascriptweb-servicessame-origin-policy

Same origin policy with same domain, but https


I'd like to make a web service call from http://www.somedomain.com to https://www.somedomain.com

Without going to the trouble of setting up a test, could someone confirm if this will be considered the same origin?

My assumption is that this will be fine, seeing as cookies are shared successfully in this situation.


Solution

  • No, it wont work the url needs the same domain and the same protocol see http://en.wikipedia.org/wiki/Same_origin_policy