1

I am doing an angular app to upload file directly to s3 storage. The app seems work only with one issue: When it start to upload, it will send a request with options method first, and it will fail with error as below:

In Chrome: OPTIONS https://{my-domain}.s3.amazonaws.com/ net::ERR_INSECURE_RESPONSE

In Firefox: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://{my-domain}.s3.amazonaws.com/. This can be fixed by moving the resource to the same domain or enabling CORS.

However, when I try visit in browser with https://{my-domain}.s3.amazonaws.com, it will say connection untrust, and if I choose add exception, everythings goes very well.

So, I guess it is to do with the SSL certificate which is for s3.amazonaws.com not for {my-domain}.s3.amazonaws.com. It should not because CORS, otherwise later it should still be problem.

How can I fix it? Need another SSL?

Thanks, Ron

Ron
  • 4,250
  • 3
  • 27
  • 41

1 Answers1

2

After days efforts, finally found out it is because I got a dot "." in the bucket name, check this for more details: Amazon S3 - HTTPS/SSL - Is it possible?

Community
  • 1
  • 1
Ron
  • 4,250
  • 3
  • 27
  • 41