Switch content type of public keys back to text/plain
The public keys used to be served as text/plain. Since the cherrypy refactor they are served as text/html. This can cause weird errors on client side or trigger any content processing within the reverse proxy. Switch that back to text/plain. Change-Id: Ie30edc37f6e6136600d69e3b9eb74c86884a6879
This commit is contained in:
parent
03d11709f6
commit
d07b4d3643
|
@ -263,6 +263,7 @@ class TestWeb(BaseTestWeb):
|
|||
|
||||
resp = self.get_url("api/tenant/tenant-one/key/org/project.pub")
|
||||
self.assertEqual(resp.content, public_pem)
|
||||
self.assertIn('text/plain', resp.headers.get('Content-Type'))
|
||||
|
||||
def test_web_404_on_unknown_tenant(self):
|
||||
resp = self.get_url("api/tenant/non-tenant/status")
|
||||
|
|
|
@ -279,6 +279,7 @@ class ZuulWebAPI(object):
|
|||
'project': project})
|
||||
resp = cherrypy.response
|
||||
resp.headers['Access-Control-Allow-Origin'] = '*'
|
||||
resp.headers['Content-Type'] = 'text/plain'
|
||||
return job.data[0]
|
||||
|
||||
@cherrypy.expose
|
||||
|
|
Loading…
Reference in New Issue