Add some useful owasp suggested headers

This commit is contained in:
Adam Shimali
2016-01-07 13:58:38 +00:00
parent 30a5b771e2
commit 78b8aed96b
3 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
def test_owasp_useful_headers_set(notifications_admin):
with notifications_admin.test_request_context():
response = notifications_admin.test_client().get('/')
assert response.status_code == 200
assert response.headers['X-Frame-Options'] == 'deny'
assert response.headers['X-Content-Type-Options'] == 'nosniff'
assert response.headers['X-XSS-Protection'] == '1; mode=block'