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:
Tobias Henkel 2018-06-11 13:21:02 +02:00
parent 03d11709f6
commit d07b4d3643
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
2 changed files with 2 additions and 0 deletions

View File

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

View File

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