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
This commit is contained in:
James E. Blair 2019-08-02 09:07:28 -07:00
parent ccfdcd1e84
commit c5e7174c2f
1 changed files with 2 additions and 1 deletions

View File

@ -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