Skip to content

Commit

Permalink
deployer sets wrong URL on external URL redirects (mdn#2181)
Browse files Browse the repository at this point in the history
Fixes #350
  • Loading branch information
peterbe authored and SphinxKnight committed Dec 20, 2020
1 parent 679014d commit 6c2ec7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deployer/src/deployer/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_key(self, build_directory, file_path):
def get_redirect_keys(self, from_url, to_url):
return (
f"{self.key_prefix}{from_url.strip('/').lower()}",
f"/{to_url.strip('/')}",
f"/{to_url.strip('/')}" if to_url.startswith("/") else to_url,
)

def get_bucket_objects(self):
Expand Down

0 comments on commit 6c2ec7b

Please sign in to comment.