Updated nginx files
This commit is contained in:
@@ -28,7 +28,6 @@ http {
|
||||
local targetInfo = require "targetinfo"
|
||||
|
||||
auto_ssl:set("allow_domain", function(domain)
|
||||
ngx.log(ngx.ERR, "!!!!!!!!!! allow_domain ", ngx.ctx.toAllow)
|
||||
return ngx.ctx.toAllow
|
||||
end)
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ server {
|
||||
local scheme = ngx.var.scheme
|
||||
local res = targetInfo.get(ngx, host, ngx.ctx.targetInfo)
|
||||
|
||||
ngx.log(ngx.ERR, "!!!!!!!!! after getTargetInfo proxy.conf ", res["ip"])
|
||||
|
||||
if scheme == "http" then
|
||||
if res["forcessl"] == "true" then
|
||||
return ngx.redirect("https://"..host..uri, 301)
|
||||
|
||||
@@ -13,7 +13,6 @@ print("In targetInfo module")
|
||||
|
||||
-- Main function of the module
|
||||
function M.get(ngx, domain, targetInfo)
|
||||
ngx.log(ngx.ERR, "!!!!!!!!! in targetInfo get")
|
||||
if targetInfo then
|
||||
return targetInfo
|
||||
end
|
||||
@@ -22,7 +21,6 @@ function M.get(ngx, domain, targetInfo)
|
||||
local redis = require "resty.redis"
|
||||
|
||||
if not domain then
|
||||
ngx.log(ngx.ERR, "no host header found")
|
||||
ngx.exit(499)
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user