Skip to content

Commit

Permalink
Merge pull request #84 from sightmachine/ENG-6231
Browse files Browse the repository at this point in the history
ENG-623: default domain added if url does not endswith default domain
  • Loading branch information
siddharthvelotio authored Aug 21, 2024
2 parents 84ce62a + 01eede1 commit bbe77d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions smsdk/client_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def convert_to_valid_url(
if "." not in domain:
domain = f"{domain}.{default_domain}"

# Check if domain endswith default domain
if not domain.endswith(default_domain):
domain = f"{domain}.{default_domain}"

# Construct the valid URL
valid_url = f"{protocol}://{domain}"

Expand Down

0 comments on commit bbe77d6

Please sign in to comment.