Skip to content

Commit

Permalink
revert domain used in redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaroslaw Michalski committed Mar 30, 2023
1 parent 10de57f commit 4c52915
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/utils/operations/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ def __init__(self, request, container, path):
host: str = request.base_request.headers.get("X-Forwarded-Host", API_URL)
host = host.removeprefix("https://").removeprefix("api.")

# TODO: remove this IF statement when routing rule for rr-apiv2cache frontend
# domain name has been change
self.location = (
f"https://api.{host}/downloads/{container}/{path}"
if not host.startswith("sandbox")
else f"https://api-{host}/downloads/{container}/{path}"
)
self.location = f"https://api.{host}/downloads/{container}/{path}"

permalink = f"https://{API_URL}/apiv2cache/{request.path}"

Expand Down

0 comments on commit 4c52915

Please sign in to comment.