Skip to content

Commit

Permalink
Updated method name
Browse files Browse the repository at this point in the history
  • Loading branch information
caparker committed Oct 23, 2024
1 parent bb3a445 commit f03372b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openaq_api/openaq_api/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
logger = logging.getLogger("dependencies")


def is_whitelisted_route(route: str) -> bool:
def in_allowed_list(route: str) -> bool:
logger.debug(f"Checking if '{route}' is whitelisted")
allow_list = ["/", "/openapi.json", "/docs", "/register"]
if route in allow_list:
Expand Down Expand Up @@ -55,7 +55,7 @@ async def check_api_key(
"""
route = request.url.path
# no checking or limiting for whitelistted routes
if is_whitelisted_route(route):
if in_allowed_list(route):
return api_key
elif api_key == settings.EXPLORER_API_KEY:
return api_key
Expand Down

0 comments on commit f03372b

Please sign in to comment.