Estoy intentando enviar unos archivos al bucket S3 pero cada vez que le doy enviar en la consola me aparece este error
Access to fetch at 'https://the-bucket' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
lo intente instalando la gema rack-cors y creando un archivo en los initialiazers
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*', headers: :any, methods: [:get, :post, :patch, :put]
end
end
pero aun asi no he podido solventar el problema.
Estoy trabajando con la version 6.1.1 de rails