Created
September 21, 2019 22:43
-
-
Save dahngeek/09535bec1086813f8233f095aa058391 to your computer and use it in GitHub Desktop.
ActiveStorage Google cloud Storage. Solution for CORS error, THE ERROR WAS THE FOLLOWING: Error storing "image.png". Status: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"origin": ["*"], | |
"responseHeader": ["Content-Type", "Content-Md5"], | |
"method": ["PUT", "GET", "HEAD", "DELETE"], | |
"maxAgeSeconds": 3600 | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You have to add the cors.json settings to your bucket, for that instal gsutils, choose your project and run | |
gsutil cors set cors.json gs://<bucket> | |
Verify with | |
gsutil cors get gs://<bucket> | |
SOURCE: https://github.com/rails/rails/issues/31523 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment