Skip to content
This repository
Browse code

[fix] typo while selecting protocol

  • Loading branch information...
commit cfd897c1b033c4c31e93ccd76318524ec22992bf 1 parent 7ca3a24
ヨーント authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/response-stream.js
2  lib/response-stream.js
@@ -166,7 +166,7 @@ ResponseStream.prototype.redirect = function(path, status) {
166 166
   if(~path.indexOf('://')) {
167 167
     url = path;
168 168
   } else {
169  
-    url += this.req.encrypted ? 'https://' : 'http://';
  169
+    url += this.req.connection.encrypted ? 'https://' : 'http://';
170 170
     url += this.req.headers.host;
171 171
     url += (path[0] === '/') ? path : '/' + path; 
172 172
   }

0 notes on commit cfd897c

Please sign in to comment.
Something went wrong with that request. Please try again.