title: Calling HTTPS APIs from HTTP pages via javascript
body: <p>I have a landing page on <a href="http://example.com" rel="nofollow">http://example.com</a> ;that has an ajax login bar on it, which sends the user's login to the server, receives the authentication response, and displays it to the user.</p>
  
  <p>The problem with this approach, is that user login information is sent in cleartext to the server, without SSL encryption. However, when doing the same POST request to <a href="https://example.com" rel="nofollow">https://example.com</a>, NGINX responds with 401 Unauthorized.</p>
  
  <p>In what ways might we be able to use <a href="https://example.com/user_api" rel="nofollow">https://example.com/user_api</a> as the authorization URL?</p>
  
  <p>Many thanks!</p>