Skip to content

Commit f34b546

Browse files
committed
remove unnecessary comments
1 parent abe9805 commit f34b546

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

nginx-lua.conf

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,22 @@ access_by_lua '
1414
-- it is assumed that redis host is set to redis, default behaviour in docker
1515
local ok, err = red:connect("redis", 6379)
1616
if not ok then
17-
ngx.say("Failed to connect to Redis: ", err)
17+
ngx.log(ngx.STDERR, "Failed to connect to Redis: " .. err)
1818
return
1919
end
2020

2121
-- Extract only the hostname without the port
2222
local frontend = ngx.re.match(ngx.var.http_host, "^([^:]*)")[1]
23-
ngx.log(ngx.NOTICE,"frontend=" .. frontend)
24-
print("pr frontend=" .. frontend)
25-
ngx.log(ngx.NOTICE,"notice frontend=" .. frontend)
26-
ngx.log(ngx.STDERR, "stdr frontend=" .. frontend)
23+
2724
-- Extract the domain name without the subdomain
2825

2926
-- special nginx lua escaping https://github.com/openresty/lua-nginx-module#special-escaping-sequences
3027
local pattern = [=[(\\.[^.]+\\.[^.]+)$]=]
3128
local domain_name, match_err = ngx.re.match(frontend, pattern)[1]
3229
if domain_name then
33-
ngx.log(ngx.NOTICE,"domain_name=" .. domain_name)
30+
ngx.log(ngx.NOTICE,"Domain name matched: " .. domain_name)
3431
else
35-
ngx.log(ngx.ERR,"domain_name match error =",match_err)
32+
ngx.log(ngx.STDERR, "Domain_name match error: " .. match_err)
3633
end
3734

3835
-- Redis lookup

0 commit comments

Comments
 (0)