https-rewrite
Advanced tools
+2
-1
@@ -13,3 +13,4 @@ const targetProtocol = 'https'; | ||
| if (req.protocol && req.protocol !== targetProtocol) { | ||
| res.redirect(options.code, targetProtocol + '://' + req.hostname + req.originalUrl) | ||
| res.redirect(options.code, targetProtocol + '://' + req.get('host') + req.originalUrl); | ||
| return; | ||
| } | ||
@@ -16,0 +17,0 @@ next(); |
+1
-1
| { | ||
| "name": "https-rewrite", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Rewrites http requests to https", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
1652
1.1%18
5.88%