Last active
July 23, 2021 04:31
-
-
Save developius/5bfd74401da82e149f23dfa8a09c7ff2 to your computer and use it in GitHub Desktop.
Revisions
-
developius revised this gist
Jul 23, 2021 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ This gist shows you how to configure a Google Cloud Storage bucket CORS for use with Rails' ActiveStorage (or any other direct-upload mechanism). 1. Update the policy JSON to reflect your setup (likely only changing the `origin` parameter) 2. Run this: ` -
developius created this gist
Jul 23, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ 1. Update the policy JSON to reflect your setup (likely only changing the `origin` parameter) 2. Run this: ` $ gsutil cors set ./cors-json-file.json gs://<bucket-name> ` 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ [ { "origin": ["https://example.com"], "responseHeader": [ "Content-Type", "Content-Md5", "Origin", "Content-Disposition" ], "method": [ "PUT", "POST", "GET", "HEAD", "DELETE", "OPTIONS" ], "maxAgeSeconds": 3600 } ]