summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Huin <mhuin@redhat.com>2020-05-20 11:28:04 +0200
committerMatthieu Huin <mhuin@redhat.com>2020-05-20 11:30:38 +0200
commitf449cc51fc8340f5a0c6d055429eb52548c6ac48 (patch)
treebd6688eced356ea3ea8199eda6bd1b2b68259eef
parent31b83dd2e8ae808d65a0b5a8672dd244d3ce9a0e (diff)
downloadzuul-f449cc51fc8340f5a0c6d055429eb52548c6ac48.tar.gz
set Access-Control-Allow-Origin header for autohold
Align autohold's CORS policy with other endpoints. Change-Id: I677daadfafd5903dc0db7d6aba5b57de933f8bc6
-rwxr-xr-xzuul/web/__init__.py4
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'],