Token-handler now uses HTTP headers to know the true origin IP address.
This commit is contained in:
parent
76244e6fe7
commit
611765d45d
@ -13,13 +13,8 @@ dnsmanagerd = DNSManager::Client.new
|
||||
#dnsmanagerd.login login, pass
|
||||
|
||||
server = HTTP::Server.new do |context|
|
||||
pp! context.request.remote_address
|
||||
ip = case remote = context.request.remote_address
|
||||
when Socket::IPAddress
|
||||
remote.address
|
||||
else
|
||||
""
|
||||
end
|
||||
pp! context.request.headers["Host"]
|
||||
ip = context.request.headers["Host"] rescue next
|
||||
|
||||
case context.request.path
|
||||
when /^\/token-update\/(?<token>[a-z0-9-]+)/
|
||||
|
Loading…
Reference in New Issue
Block a user