Answer the question
In order to leave comments, you need to log in
Mirror on http for Ajax request from https?
Good afternoon, the following problem arose:
- there is a calculator on the site https, which takes data via Ajax - jsonp request to the https server of a third-party service. Periodically, this service goes down, BUT it also has a mirror for requests via http, which is more stable.
Here I think how to make it so that if https is not available (gets 404), then my https sends Ajax to http. How to deal with browser blocking http resources? - to look towards a local proxy? Or is there another, simpler solution?
Answer the question
In order to leave comments, you need to log in
Blocking https to http is implemented in the browser and only the client can set the parameter to ON
. And the service is placed on https precisely because it is https?
It can make a proxy through its own server with load balancing and switching in case of an error, for example, to NGINX. I can throw off a working example if you are unfamiliar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question