From c5e7174c2f1c359877bd917dc557c8e52df66bc5 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 2 Aug 2019 09:07:28 -0700 Subject: [PATCH] Add CORS support to upload-logs-swift When creating containers, add a CORS header which allows access from any host, so that the zuul web app can fetch. Change-Id: I013265643a8fcb4cff001375136c2c37958fd97a --- roles/upload-logs-swift/library/zuul_swift_upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/upload-logs-swift/library/zuul_swift_upload.py b/roles/upload-logs-swift/library/zuul_swift_upload.py index 0a113b5ab..6d2ac7214 100755 --- a/roles/upload-logs-swift/library/zuul_swift_upload.py +++ b/roles/upload-logs-swift/library/zuul_swift_upload.py @@ -490,7 +490,8 @@ class Uploader(): self.cloud.create_container(name=self.container, public=public) self.cloud.update_container( name=self.container, - headers={'X-Container-Meta-Web-Index': 'index.html'}) + headers={'X-Container-Meta-Web-Index': 'index.html', + 'X-Container-Meta-Access-Control-Allow-Origin': '*'}) # 'X-Container-Meta-Web-Listings': 'true' # The ceph radosgw swift implementation requires an