Skip to content

Commit

Permalink
new protocol propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Dec 12, 2015
1 parent b4f7bc4 commit 30d3f6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/netius/extra/proxy_r.py
Expand Up @@ -109,7 +109,8 @@ def on_headers(self, connection, parser):
version_s = parser.version_s
is_secure = connection.ssl
host = headers.get("host", None)
protocol = "https" if is_secure else "http"
protocol = headers.get("x-forwarded-proto", None)
protocol = protocol or ("https" if is_secure else "http")

# tries to extract the various attributes of the current connection
# that are going to be used for the routing operation, this attributes
Expand Down

0 comments on commit 30d3f6e

Please sign in to comment.