Merge pull request from rhcs-dashboard/44935-custom-cherryPy-header

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen <nia@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
This commit is contained in:
Lenz Grimmer 2020-04-28 10:52:53 +02:00 committed by GitHub
commit 56a2a9ab9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions
qa/tasks/mgr/dashboard
src/pybind/mgr/dashboard/services

View File

@ -21,3 +21,9 @@ class RequestsTest(DashboardTestCase):
self.assertHeaders({
'Content-Type': 'application/json',
})
def test_server(self):
self._get('/api/summary')
self.assertHeaders({
'server': 'Ceph-Dashboard'
})

View File

@ -15,6 +15,10 @@ import jwt
from .access_control import LocalAuthenticator, UserDoesNotExist
from .. import mgr
cherrypy.config.update({
'response.headers.server': 'Ceph-Dashboard'
})
class JwtManager(object):
JWT_TOKEN_BLACKLIST_KEY = "jwt_token_black_list"