Solved

AJAX call over HTTPS, from HTTP page

Posted on 2007-03-27
3
253 Views
Last Modified: 2007-11-27
I have a web site where a member hits the home page in HTTP, and the login box sends their user/pass over to an HTTPS page via AJAX. This is failing since it appears the AJAX HTTP request is not allowed over HTTPS, since the origin page was HTTP.

This seems like a huge limitation! Is there a workaround, besides redirecting the user to run the whole site in HTTPS?

thanks
Eric
0
Comment
Question by:pnoeric
  • 2
3 Comments
 

Author Comment

by:pnoeric
Comment Utility
Could this have anything to do with the SSL cert on our server? I.e. if it is flawless (not self-signed, the domain names all match properly, etc.) would it work ok?
0
 
LVL 15

Accepted Solution

by:
stanscott2 earned 500 total points
Comment Utility
Ajax requests work over HTTPS the same way they do over HTTP.  HTTPS is not another protocol, it is merely HTTP over an SSL/TLS-encrypted connection. That encryption is transparent to the user
agent.

However, you might have the issue of making a cross-domain request.  Ajax requests must be made to the same domain as the requesting page, for security reasons.  There are ways around this -- Google "cross domain Ajax" and you'll get a wealth of resources.  I can't suggest one or the other, because I don't know your setup and what exactly you're doing.
0
 

Author Comment

by:pnoeric
Comment Utility
Yeah, no luck, it's a cross-domain issue, even though it's not really across a different domain, it's just going from HTTP to HTTPS. bummer.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now