Skip to content

Commit

Permalink
fix(fastapi_helpers.py): log request headers only
Browse files Browse the repository at this point in the history
  • Loading branch information
OdyAsh committed Dec 8, 2024
1 parent 2d30e2a commit 2f9eeb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ansari/util/fastapi_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
# Defined in a separate file to avoid circular imports between main_*.py files
def validate_cors(request: Request, settings: Settings = Depends(get_settings)) -> bool:
try:
# TODO (odyash): Return this to request.headers and remove \n\n
logger.info(f"Headers of raw request are \n\n{request.__dict__}")
logger.info(f"Headers of raw request are: {request.headers}")
origins = get_settings().ORIGINS
incoming_origin = [
request.headers.get("origin", ""), # If coming from ansari's frontend website
Expand Down

0 comments on commit 2f9eeb2

Please sign in to comment.