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 wi
Solution 1:
No, it wont work the url needs the same domain and the same protocol see http://en.wikipedia.org/wiki/Same_origin_policy
Solution 2:
No, it is not same origin.
Perhaps you can configure your server to accept either http or https call? If this is the case you can use protocol relative urls to make your requests use whatever protocol you are already using.
reqUrl = "//www.somedomain.com"
By the way, it is usually not correct to make a httrps call from an http page. The initial http page makes you lose all securty the https would give since there is no way to authenticate the page has been served correctly and is running the intended scripts instead of something evil.
Post a Comment for "Same Origin Policy With Same Domain, But Https"