Skip to content

Commit

Permalink
Moved tests and removed auth from general whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
caparker committed Oct 3, 2024
1 parent 5e23ca5 commit 57a6477
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion openaq_api/openaq_api/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

def is_whitelisted_route(route: str) -> bool:
logger.debug(f"Checking if '{route}' is whitelisted")
allow_list = ["/", "/auth", "/openapi.json", "/docs", "/register"]
allow_list = ["/", "/openapi.json", "/docs", "/register"]
if route in allow_list:
return True
if "/v2/locations/tiles" in route:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def test_empty_key_returns_401(client):
response = client.get("/ping", headers={"X-API-Key":""})
assert response.status_code == 401


def test_invalid_key_returns_401(client):
response = client.get("/ping", headers={"X-API-Key":"invalid-key"})
assert response.status_code == 401
Expand Down

0 comments on commit 57a6477

Please sign in to comment.