Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Feb 28, 2024
1 parent b106821 commit 36764df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions homu/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,9 @@ def redirect_to_canonical_host():
request_url = urllib.parse.urlparse(request.url)
redirect_url = request_url

# Assume that we're always deployed behind something that hides https:// from us.
# In production TLS is terminated at ELB, so the actual bors app sees only http:// requests.
# Assume that we're always deployed behind something that hides https://
# from us. In production TLS is terminated at ELB, so the actual bors app
# sees only http:// requests.
request_url = redirect_url._replace(
scheme="https"
)
Expand All @@ -1049,7 +1050,7 @@ def redirect_to_canonical_host():
redirect_url = redirect_url._replace(path="/")

if request_url != redirect_url:
print("redirecting original=" + request_url + " to new=" + redirect_url)
print("redirecting original=" + request_url + " to new=" + redirect_url) # noqa
redirect(urllib.parse.urlunparse(redirect_url), 301)


Expand Down

0 comments on commit 36764df

Please sign in to comment.