Skip to content

Commit

Permalink
refactor: Improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KShivendu committed Sep 19, 2023
1 parent 633adad commit 5c375a6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions supertokens_python/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,7 @@ def get_top_level_domain_for_same_site_resolution(url: str) -> str:
parsed_url: Any = extract(hostname, include_psl_private_domains=True)
if parsed_url.domain == "": # type: ignore
if hostname.endswith(".amazonaws.com"):
# Example: url http://ec2-xx-yyy-zzz-0.compute-1.amazonaws.com
# return amazonaws.com
# If user deploys the website on the same ec2 instance as the API
# this use SameSite=lax, otherwise SameSite=none
# tldextract.extract() isn't able to parse AWS service public urls
return "amazonaws.com"

raise Exception(
Expand Down

0 comments on commit 5c375a6

Please sign in to comment.