Skip to content

Commit

Permalink
check referer for localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Clerkx committed Dec 18, 2023
1 parent 31635e4 commit d186aea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion App/functions/report-python-cloud-run/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def return_report():
polygon_str = POLYGON_DEFAULT

origin = request.headers.get("Referer")
if not origin:
print(f"detected origin: {origin}")
if not origin or origin == "/":
stac_root = STAC_ROOT_DEFAULT
else:
stac_root = origin + "/STAC/catalog.json"
Expand Down

0 comments on commit d186aea

Please sign in to comment.