mirror of
https://github.com/neocities/neocities.git
synced 2025-07-26 04:18:22 +02:00
support for multiple cache purge ips in stats parsing
This commit is contained in:
parent
b80c4a98a2
commit
5c2f56e0b6
3 changed files with 8 additions and 4 deletions
|
@ -19,7 +19,7 @@ class Stat < Sequel::Model
|
|||
def parse_logfiles(path)
|
||||
total_site_stats = {}
|
||||
|
||||
cache_control_ip = $config['cache_control_ip']
|
||||
cache_control_ips = $config['cache_control_ips']
|
||||
|
||||
Dir["#{path}/*.log"].each do |log_path|
|
||||
site_logs = {}
|
||||
|
@ -34,7 +34,7 @@ class Stat < Sequel::Model
|
|||
|
||||
time, username, size, path, ip, referrer = hit_array
|
||||
|
||||
next if ip == cache_control_ip
|
||||
next if cache_control_ips.include?(ip)
|
||||
|
||||
log_time = Time.parse time
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue