Answer the question
In order to leave comments, you need to log in
Post request from https client to http server, how to set it up correctly?
There is a React js client that should send json data to the server where node js will process it and return the response, the problem is that the client is on a domain with an ssl certificate and the browser blocks fetch requests to http, what technology can be used to get around this? How can client side php be used for such requests?
Answer the question
In order to leave comments, you need to log in
Make a request between servers. First from ssl to your server, from it to the server without ssl
Obviously you need to install an SSL certificate on the server. If this is not possible for some reason, then you can raise a second auxiliary server that will proxy requests through itself.
By the way, there is another option to connect Cloudflare, it's not difficult and the certificate will be installed by Cloudflare itself for free. To connect Cloudflare, access to the server is NOT needed, access to the domain is enough.
If you are interested in a solution method exclusively on the client side, this is also possible, but it will be a crutch.
You need to prepare a special transit page that opens via the http protocol. Accordingly, if you need to transfer data, stupidly open this same transit page through windiw.open () and transmit and receive information through it. To communicate with the transit page, use postMessage() , well, I’ll add that by manipulating the window.open() parameters, the transit page on a PC can be made small and inconspicuous, taking it into a corner and then just beyond the edges of the screen. On a smartphone, of course, this will not work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question