I need to make an asynchronous call to a secure (HTTPS) URL for the same domain.
Currently the page is working with regular HTTP (non-secure).
In other words: this is calling an URL in the same domain but using HTTPS.
Before switching this calls to HTTPS I ended implementing a server-side proxy to allow cross-domain AJAX calls, but now I'm facing same origin policy since HTTP and HTTPS are considered different origins too. So this proxy is unusable.
Summary: how to do cross-domain, asnynchronous POST requests in this scenario?
Various notes:
- I couldn't accept any answer suggesting JSONP. Asynchronous calls must be using POST verb.
- I'm using latest version of jQuery. Answer could be based on this library, or any other solving this problem.
- Accessing the entire page over HTTPS isn't a solution.
- Server platform is Microsoft .NET 4.0 (ASP.NET 4.0).
- UDPATE: CORS isn't an option. There's no wide support for this in modern browsers.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…