I have a web dashboard that needs to make requests to an edge API that has a self signed certificate. Obviously we can’t make requests directly to it because browsers today block it unless you install the certificates. So I want to proxy the request through my backend API and make the request to the self signed endpoint from there. However, I can’t have the proxy server seeing the request payload, so decrypting the request then re-encrypting it to the edge API is not an option. Which leads me to my main question:
Is it possible to create an HTTPS request in JavaScript thats encrypted to the edge APIs certificate, serialize it, then post it to my backend API which will then simply pass it on directly? I’m able to retrieve the TLS certificate of the edge API in the browser, so I’m trying to find a way to use it in order to prevent the proxy from being able to read the proxied request. For more context, I use Golang and Python in my backend.