HTTPS Request issue = requested an insecure XMLHttpRequest endpoint (AWS) - amazon-web-services

I have deployed a react app on S3 while backend is running on EC2 (node) when I use S3 over HTTP it works and shows content even with route53 over http it works.
If I access domain over HTTPS via route53 it doesnt load the page. I have attached SSL with route 53 but no use.
I have also tried using cloud front and used SSL with it too yet I receive same error.
Error As Follow
"Mixed Content: The page at '' was loaded over HTTPS, but
requested an insecure XMLHttpRequest endpoint ''. This request
has been blocked; the content must be served over HTTPS."

Related

Do I need to connect default firebase domain in order to get SSL certificate?

I've deployed the frontend of a web app to Firebase. Now when I try to make request I see that request is going to https://the_url but the backend link is http://the_url and I get the following error.
Mixed Content: The page at 'https://the_url' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://the_url. This request has been blocked; the content must be served over HTTPS.
I tried to get SSL certificate and import an certificate to AWS to make connection https, but I wasn't able to get it.

Mixed content error: This request has been blocked; the content must be served over HTTPS

I have deployed an Angular application on Firebase that uses Node.js APIs that is hosted on AWS Windows EC2 instance. When I try to run the Firebase app on the browser and try to log in, I get the following error:
The page at 'https://website.web.app/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://IP-address/API'. This request has been blocked; the content must be served over HTTPS.
Is there a way I can load an SSL certificate onto the AWS EC2 instance to allow the APIs to be sent over an HTTPS url?
Is there a way I can load an SSL certificate onto the AWS EC2 instance to allow the APIs to be sent over an HTTPS url?
Yes, there are many ways of doing this. The easiest (don't confused with the cheapest) is to front your instance with an Application Load Balancer. Also you need your own domain. Once you have bought the domain, you can get free ssl from AWS ACM. After that you can easly add the ssl certificate to the ALB to have full support for HTTPS.

How to resolve the 504 error on AWS Cloudfront EC2 instance

I have the following setup for my website on windows server:
Domain registered in Route 53
EC2 Instance running on windows server
Cloud front to serve the EC2 origin using the distribution with the option to get user redirected from HTTP to HTTPs.
Public certificate deployed on cloud front.
Here is what is working:
The EC2 Origin, every page works on http protocol.
Domain access, correctly redirects user from http to https
The first website page loads without issues.
ISSUE:
The issue is the error 504 which is displayed when any of the link is clicked on the website. Here is the complete error detail:
504 ERROR
The request could not be satisfied.
CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)
I have included all the route options to accept http and https.

I'm getting [Your connection isn't private] after using ssl certificate from AWS

I have a web app which consists of 2 parts, front-end(hosted on host gator via https) and a back-end on AWS.
At first I got 'Mixed Content' error when I tried to connect my https front-end to my http back-end on elastic beanstalk, so I got myself an ssl certificate from ACM and applied it to my http back-end using load balancer, so now I can access back-end via the same link but with 'https' instead of 'http', but I get this error in the browser 'Your connection isn't private, NET::ERR_CERT_COMMON_NAME_INVALID', and I have to proceed manually, same happens with my front-end when I connect it to the new https link, as I get this error in the console.
what should I do?

Securing WIX subdomain connected (externally) to AWS

I'm relatively new to AWS and was trying to secure my WIX subdomain (api.example.co.za) which is connected to AWS. So far, I have an EC2 instance for the website, as well as my S3 bucket running. I have also set up my CloudFront and pointed my subdomain on wix (api.example.co.za) to CloudFront (df***.cloudfront.net) within WIX DNS records. I got an AWS certificate through DNS verification and attached it to my CloudFront. In AWS CloudFront, I also routed all requests to my S3 bucket. I also redirected all traffic from http to https in CloudFront
When I type into my brower api.example.co.za, I am able to access my website, but insecurely, just as before. But when I type https://api.example.co.za, the website is secure, but does not load the web content. When Inspect the web content in Chrome>Inspect>Console, I see the following errors
Mixed Content: The page at 'https://api.example.co.za' zone-evergreen.js:29** was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.example.co.za/users/5e7a2'. This request has been blocked; the content must be served over HTTPS.