mirror of
https://github.com/pretix/pretix.git
synced 2026-08-10 10:47:00 +00:00
Don't check CSP on JSON responses
This commit is contained in:
@@ -226,8 +226,9 @@ def test_one_view(logged_in_client, url, expected, event, item, item_category, o
|
|||||||
assert response.status_code == expected
|
assert response.status_code == expected
|
||||||
|
|
||||||
# Do not reintroduce any CSP nonces into control responses, as discussed in PR #6387
|
# Do not reintroduce any CSP nonces into control responses, as discussed in PR #6387
|
||||||
assert 'script-src' in response['Content-Security-Policy']
|
if response['Content-Type'] != 'application/json':
|
||||||
assert 'nonce-' not in response['Content-Security-Policy']
|
assert 'script-src' in response['Content-Security-Policy']
|
||||||
|
assert 'nonce-' not in response['Content-Security-Policy']
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('url', [
|
@pytest.mark.parametrize('url', [
|
||||||
|
|||||||
Reference in New Issue
Block a user