Fixed nginx conf issue
This commit is contained in:
@@ -25,12 +25,11 @@ http {
|
||||
auto_ssl = (require "resty.auto-ssl").new()
|
||||
auto_ssl:set("storage_adapter", "resty.auto-ssl.storage_adapters.redis")
|
||||
auto_ssl:set("allow_domain", function(domain)
|
||||
ngx.log(ngx.ERR, "!!!!!!!! nginx.conf allow_domain !!!!!!!!!! ", domain)
|
||||
ngx.log(ngx.ERR, "!!!!!!!! nginx.conf allow_domain !!!!!!!!!! ", domain, ngx.ctx.toAllow)
|
||||
return ngx.ctx.toAllow
|
||||
end)
|
||||
|
||||
auto_ssl:set("request_domain", function(ssl, ssl_options)
|
||||
ngx.log(ngx.ERR, "!!!!!! nginx.conf request_domain !!!!!!!", domain)
|
||||
|
||||
local json = require "cjson"
|
||||
local redis = require "resty.redis"
|
||||
@@ -38,6 +37,8 @@ http {
|
||||
|
||||
local domain, err = ssl.server_name()
|
||||
|
||||
ngx.log(ngx.ERR, "!!!!!! nginx.conf request_domain !!!!!!!", domain)
|
||||
|
||||
local function connect(path)
|
||||
assert(socket:settimeout(.1))
|
||||
local status,err = pcall(function() assert(socket:connect(path)) end)
|
||||
|
||||
@@ -24,7 +24,7 @@ server {
|
||||
local res = ngx.ctx.targetInfo
|
||||
if not res then
|
||||
ngx.log(ngx.ERR, "This should not happen", domain)
|
||||
ngx.exit(499)
|
||||
ngx.exit(406)
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user