Fixed nginx conf issue
This commit is contained in:
@@ -25,12 +25,12 @@ http {
|
|||||||
auto_ssl = (require "resty.auto-ssl").new()
|
auto_ssl = (require "resty.auto-ssl").new()
|
||||||
auto_ssl:set("storage_adapter", "resty.auto-ssl.storage_adapters.redis")
|
auto_ssl:set("storage_adapter", "resty.auto-ssl.storage_adapters.redis")
|
||||||
auto_ssl:set("allow_domain", function(domain)
|
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)
|
||||||
return ngx.ctx.toAllow
|
return ngx.ctx.toAllow
|
||||||
end)
|
end)
|
||||||
|
|
||||||
auto_ssl:set("request_domain", function(ssl, ssl_options)
|
auto_ssl:set("request_domain", function(ssl, ssl_options)
|
||||||
ngx.log(ngx.ERR, "nginx.conf request_domain", domain)
|
ngx.log(ngx.ERR, "!!!!!! nginx.conf request_domain !!!!!!!", domain)
|
||||||
|
|
||||||
local json = require "cjson"
|
local json = require "cjson"
|
||||||
local redis = require "resty.redis"
|
local redis = require "resty.redis"
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ server {
|
|||||||
set $header_host $host;
|
set $header_host $host;
|
||||||
|
|
||||||
access_by_lua '
|
access_by_lua '
|
||||||
|
ngx.log(ngx.ERR, "!!!!!!!!! proxy.conf !!!!!!!! ", domain)
|
||||||
local res = ngx.ctx.targetInfo
|
local res = ngx.ctx.targetInfo
|
||||||
if not res then
|
if not res then
|
||||||
ngx.log(ngx.ERR, "no host found for key ", domain)
|
ngx.log(ngx.ERR, "This should not happen", domain)
|
||||||
ngx.exit(406)
|
ngx.exit(499)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
members = ['Roisin', 'Billy', 'Joseph', 'Emily', 'Chloe']
|
||||||
|
|
||||||
|
message = "I love you {}"
|
||||||
|
|
||||||
|
for member in members:
|
||||||
|
if member == "Billy":
|
||||||
|
continue
|
||||||
|
print(message.format(member))
|
||||||
Reference in New Issue
Block a user