From af35b1a9077c6003d0592da09f0d49d122e4b7bc Mon Sep 17 00:00:00 2001 From: Josh King Date: Thu, 11 Dec 2014 13:29:40 -0500 Subject: [PATCH] Change HTTPS header check to look for port 443 instead of missing HTTPS environment variable. --- modules/crypto.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/crypto.lua b/modules/crypto.lua index 2c3bcf2..f15c901 100644 --- a/modules/crypto.lua +++ b/modules/crypto.lua @@ -40,7 +40,7 @@ end --! @example crypto_check_https.htm function crypto.check_https(node, env) if string.match(env.REQUEST_URI, node) then - if env.HTTPS ~= "on" then + if env.SERVER_PORT ~= "443" then http.redirect("https://"..env.SERVER_NAME..env.REQUEST_URI) return true end