I'm trying to make Cross-Domain webservice calls from an HTTP page to an HTTPS service.
I have set up the proper CORS headers on the server (it works with HTTP-HTTP and HTTPS-HTTPS).
It does work if I change the requests to JSONp.
What I'm seeing in Chrome and Firefox is the HTTPS request is never sent, it's immediately aborted, and the server never sees the request.
It is worth noting that the preflight OPTIONS
request is aborted (and it doesn't reach the server).
I can't find any source that explains that this is indeed not possible (HTTP to HTTPS) and better yet: explains why. I can understand HTTPS to HTTP is unsafe, but the othe way around should be fine right? It seems silly to me because JSONp works (but it's messy).
notes
I also have withCredentials
set to true
and I'm sending some custom headers and a custom Content-Type
: application/json
I'm using the regular XMLHTTPRequest with fallbacks to JSONp for IE<=9