--cors Access-Control-Allow-Headers: Authorization

Refs #1467, refs https://github.com/simonw/datasette-auth-tokens/issues/4
This commit is contained in:
Simon Willison 2021-10-14 12:03:28 -07:00
commit 8584993529
7 changed files with 20 additions and 11 deletions

View file

@ -1955,7 +1955,8 @@ def test_trace(trace_debug):
def test_cors(app_client_with_cors, path, status_code):
response = app_client_with_cors.get(path)
assert response.status == status_code
assert "*" == response.headers["Access-Control-Allow-Origin"]
assert response.headers["Access-Control-Allow-Origin"] == "*"
assert response.headers["Access-Control-Allow-Headers"] == "Authorization"
@pytest.mark.parametrize(