Search code examples
reactjsamazon-ec2aws-amplifyfirebase-hostingreact-fullstack

Mixed Content: The page at 'https://***********.web.app/' was loaded over HTTPS, but requested an insecure resource 'http://ec2-/-/-/-/-/-'


I have hosted one of my react app on Google Firebase which is by default HTTPS and one of my react app is hosted on AWS amplify which is also by default HTTTPS and the backend is hosted on aws-ec2 which is HTTP.

Is there any way that without upgrading my aws-ec2 to HTTPS I can use the service?


Solution

  • You can't use no http resource with firebase hosting, also you can't convert firebase hosting site to http. So, i suggest you to find another way to fix this.

    • Stop using firebase, and find another host where http resources is allowed.
    • Change you backend to https. There's an easy way to do this using a letsencrypt certificate. To generate the certificate, I recommend you use acme-nginx client https://github.com/kshcherban/acme-nginx.