active_admin_editor icon indicating copy to clipboard operation
active_admin_editor copied to clipboard

CORS error "Response for preflight is invalid (redirect)"

Open kubido opened this issue 9 years ago • 7 comments

Hi,

I've follow the instruction in the docs. setup the aws credentials in initializers. added cors configuration to the bucket but still get this error "Response for preflight is invalid (redirect)?

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>HEAD</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

How do I handle this? screen shot 2016-01-25 at 4 02 56 pm

kubido avatar Jan 25 '16 08:01 kubido

Have you found out the way to fix it ?

huyqdang avatar Aug 14 '17 18:08 huyqdang

http://www.corrspt.com/blog/2016/01/17/uploading-to-amazon-s3-response-for-preflight-is-invalid-redirect-307/

Basically, this post says to wait for 2 hours(approx.) if you created new bucket

phanikmr avatar Oct 25 '17 07:10 phanikmr

After waiting for 2 hours did you guys solve the problem? @hokakede1 @phanikmr

prameshbajra avatar Jun 30 '18 11:06 prameshbajra

@prameshbajra I issue was solved after waiting. https://github.com/phanikmr/S3-Uploader

phanikmr avatar Jul 01 '18 06:07 phanikmr

@phanikmr I waited for 4 with no resolution. Any idea what might be wrong?

prameshbajra avatar Jul 01 '18 15:07 prameshbajra

did you set your s3 region correctly?

phanikmr avatar Jul 02 '18 05:07 phanikmr

@phanikmr yea I did. I verified it a million times may be.

prameshbajra avatar Jul 02 '18 06:07 prameshbajra