Fixed nginx conf issue
This commit is contained in:
@@ -25,21 +25,21 @@ server {
|
||||
local scheme = ngx.var.scheme
|
||||
|
||||
if scheme == "http" then
|
||||
if ngx.req.targetInfo["forcessl"] == "true" then
|
||||
if ngx.ctx.targetInfo["forcessl"] == "true" then
|
||||
return ngx.redirect("https://"..host..uri, 301)
|
||||
end
|
||||
end
|
||||
|
||||
if ngx.req.targetInfo["targetssl"] == "true" then
|
||||
if ngx.ctx.targetInfo["targetssl"] == "true" then
|
||||
ngx.var.target_scheme = "https"
|
||||
end
|
||||
|
||||
if ngx.req.targetInfo["host-pass-though"] == "false" then
|
||||
ngx.var.header_host = ngx.req.targetInfo["ip"]
|
||||
if ngx.ctx.targetInfo["host-pass-though"] == "false" then
|
||||
ngx.var.header_host = ngx.ctx.targetInfo["ip"]
|
||||
end
|
||||
|
||||
ngx.var.target = ngx.req.targetInfo["ip"]
|
||||
ngx.var.target_port = ngx.req.targetInfo["targetPort"]
|
||||
ngx.var.target = ngx.ctx.targetInfo["ip"]
|
||||
ngx.var.target_port = ngx.ctx.targetInfo["targetPort"]
|
||||
';
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user