Skip to content

Commit

Permalink
Move check and add to web image handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjb committed Jan 16, 2024
1 parent 85c6613 commit 628e344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions canarytokens/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ def _check_and_add_cors_headers(request):
respond with `Access-Control-Allow-Origin` and `Access-Control-Allow-Methods`. Else, we
will add
"""
if request.method == "GET":
if request.method.upper() == "GET":
request.setHeader("Access-Control-Allow-Origin", "*")
elif request.method == "OPTIONS":
elif request.method.upper() == "OPTIONS":
if (
request.getHeader("Access-Control-Request-Method") is None
or request.getHeader("Origin") is None
Expand Down

0 comments on commit 628e344

Please sign in to comment.