I have been messing around with this application for a while but seem to keep hitting roadblocks. I am trying to have a public HTTPS page make a fetch to a private ESP8266.
As you can guess I ran into several infamous CORS issues and had to become with these posts: https://developer.chrome.com/blog/private-network-access-update/
https://web.dev/cors-rfc1918-feedback/
https://wicg.github.io/private-network-access/
After reading this I became persuaded that I needed to have an HTTPS server on my ESP8266 because this is the only way that the CORS policy would allow me to make a request from a public page to a private one. My issue now is that Chrome will allow these requests with a self-signed certificate on the ESP8266, but Firefox (which didn't throw any errors about this until very recently) blocked my request because the certificate was self-signed.
Is there any easy way to have a trusted certificate (i.e. something not self-signed) on my ESP8266 so that both Chrome and Firefox will allow this request?
If not, what is the most appropriate way to allow HTTPS connections to come to my ESP8266 without having to have a user trust the self-signed certificate in their browser?