mirror of
https://github.com/CFC-Servers/cfc_cl_http_whitelist.git
synced 2025-03-04 03:03:18 -05:00
ensure matching of entire string, add www.google.com to whitelist
This commit is contained in:
parent
1cece9e125
commit
cd832a9f6c
@ -55,6 +55,7 @@ CFCHTTP.allowedAddresses = {
|
||||
["*.cfcservers.org"] = {allowed=true, isPermanent=true},
|
||||
["cfcservers.org"] = {allowed=true, isPermanent=true},
|
||||
["google.com"] = {allowed=true, isPermanent=true},
|
||||
["www.google.com"] = {allowed=true, isPermanent=true},
|
||||
}
|
||||
|
||||
|
||||
@ -93,8 +94,8 @@ function CFCHTTP.isAllowed( url )
|
||||
if not allowedEntry.isPattern then
|
||||
allowedAddr = escapeAddr( allowedAddr )
|
||||
end
|
||||
|
||||
if string.match( address, allowedAddr ) then
|
||||
|
||||
if string.match( address, "^"..allowedAddr.."$" ) then
|
||||
return allowedEntry.allowed
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user