commit | 673ac6342f58808553c7ad21502253a7fff94e41 | [log] [tgz] |
---|---|---|
author | James E. Blair <jeblair@redhat.com> | Thu Jan 30 17:29:25 2020 -0800 |
committer | James E. Blair <jeblair@redhat.com> | Thu Jan 30 17:29:25 2020 -0800 |
tree | e3a0d39235c63624ecd0d8c788e2ee86265f9935 | |
parent | 484c05f30cb5846d4b39febfbf7545d5dcca374e [diff] |
Update cors and website settings for log upload The method is required for CORS to work. Change-Id: Ie4cce69623a1abb798ff57873980e76bf2d3fa8f
diff --git a/roles/upload-logs-gcs/library/zuul_google_storage_upload.py b/roles/upload-logs-gcs/library/zuul_google_storage_upload.py index da9734a..f658113 100755 --- a/roles/upload-logs-gcs/library/zuul_google_storage_upload.py +++ b/roles/upload-logs-gcs/library/zuul_google_storage_upload.py
@@ -627,8 +627,12 @@ self.prefix = prefix or '' self.bucket = client.bucket(container) - cors = [{'origin': ['*']}] + cors = [ + {'method': ['GET', 'HEAD']}, + {'origin': ['*']} + ] self.bucket.cors = cors + self.bucket.website = {"mainPageSuffix": "index.html"} self.bucket.update() self.url = os.path.join('https://storage.googleapis.com/',