diff options
author | Matthieu Huin <mhuin@redhat.com> | 2020-05-20 11:28:04 +0200 |
---|---|---|
committer | Matthieu Huin <mhuin@redhat.com> | 2020-05-20 11:30:38 +0200 |
commit | f449cc51fc8340f5a0c6d055429eb52548c6ac48 (patch) | |
tree | bd6688eced356ea3ea8199eda6bd1b2b68259eef /zuul/web | |
parent | 31b83dd2e8ae808d65a0b5a8672dd244d3ce9a0e (diff) | |
download | zuul-f449cc51fc8340f5a0c6d055429eb52548c6ac48.tar.gz |
set Access-Control-Allow-Origin header for autohold
Align autohold's CORS policy with other endpoints.
Change-Id: I677daadfafd5903dc0db7d6aba5b57de933f8bc6
Diffstat (limited to 'zuul/web')
-rwxr-xr-x | zuul/web/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zuul/web/__init__.py b/zuul/web/__init__.py index bae963a75..6336ac15f 100755 --- a/zuul/web/__init__.py +++ b/zuul/web/__init__.py @@ -437,6 +437,8 @@ class ZuulWebAPI(object): 'reason': request['reason'], 'node_hold_expiration': request['node_expiration'] }) + resp = cherrypy.response + resp.headers['Access-Control-Allow-Origin'] = '*' return result @cherrypy.expose @@ -459,6 +461,8 @@ class ZuulWebAPI(object): if not request: raise cherrypy.HTTPError( 404, 'Hold request %s does not exist.' % request_id) + resp = cherrypy.response + resp.headers['Access-Control-Allow-Origin'] = '*' return { 'id': request['id'], 'tenant': request['tenant'], |