There is a server. On the server is apache. Apache has certificates. On the apache is a website - client, thanks to certificates the client is accessible by
On the same server but different port runs node.js app. So when I go to
http://example.com:port I get an answer.
I want to get data from node.js server with ajax from client. So far I get
Mixed Content: The page at 'https://example.com/~path' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://server.com:port'. This request has been blocked; the content must be served over HTTPS.
Obviously I need node.js to be https. I can't use self-signed certificates because it's public app and people would still have to add certificate to their browser right?
What is the best solution to my situation? Can I somehow utilize certificates from apache. Does it help me that they both run on the same server? Or should I use something else?
The server is not mine, so there is a limit of what I can do.