Skip to content

Commit 14f70fe

Browse files
committed
Forward additional headers to detect SSL
When SSL is being offloaded by a middlebox one of these headers might be added to the request.
1 parent 4561f50 commit 14f70fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/transport.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ class Session
131131

132132
headers = {}
133133
for key in ['referer', 'x-client-ip', 'x-forwarded-for', \
134-
'x-cluster-client-ip', 'via', 'x-real-ip', 'host', \
135-
'user-agent', 'accept-language']
134+
'x-cluster-client-ip', 'via', 'x-real-ip', \
135+
'x-forwarded-proto', 'x-ssl', \
136+
'host', 'user-agent', 'accept-language']
136137
headers[key] = req.headers[key] if req.headers[key]
137138
if headers
138139
@connection.headers = headers

0 commit comments

Comments
 (0)