
개발/Google Cloud Platform
구글 클라우드 스토리지 CORS 세팅방법 (set up CORS for Google Cloud Storage Bucket)
gsutil cors set cors-json-file.json gs://example-bucket google cloud shell에서 touch cors-setting.json 을 생성해줍니다. [ { "origin": [ "*" ], "responseHeader": [ "Content-Type" ], "method": [ "GET", "HEAD", "DELETE" ], "maxAgeSeconds": 3600 } ] cors-json-file.json의 내용을 위와 같이 작성해줍니다. 핵심은 origin입니다. 원하는 도메인을 지정하거나 전체 access를 허용한다면 *을 origin에 추가하면 됩니다. CORS 설정파일을 추가했다면, 이제 cors를 제어할 버킷에게 해당 설정을 반영해주면 됩니다. ..