Remove "already initialized" constant warning.
This commit is contained in:
parent
ae15faeb34
commit
3e835047da
|
@ -166,7 +166,7 @@ class Middleware::RequestTracker
|
|||
log_request_info(env, result, info) unless env["discourse.request_tracker.skip"]
|
||||
end
|
||||
|
||||
PRIVATE_IP = /^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|([fF][cCdD])/
|
||||
PRIVATE_IP ||= /^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|([fF][cCdD])/
|
||||
|
||||
def is_private_ip?(ip)
|
||||
ip = IPAddr.new(ip) rescue nil
|
||||
|
|
Loading…
Reference in New Issue