diff --git a/config.yml.template b/config.yml.template index 885c797c..a55782d3 100644 --- a/config.yml.template +++ b/config.yml.template @@ -50,3 +50,4 @@ test: - mrteacher stop_forum_spam_api_key: testkey screenshots_url: http://screenshots:derp@screenshotssite.com + cache_control_ip: 1.2.3.4 diff --git a/config.yml.travis b/config.yml.travis index 3093ac19..ae274f3a 100644 --- a/config.yml.travis +++ b/config.yml.travis @@ -20,3 +20,4 @@ education_tag_whitelist: - mrteacher stop_forum_spam_api_key: testkey screenshots_url: http://screenshots:derp@screenshotssite.com +cache_control_ip: 1.2.3.4 diff --git a/models/stat.rb b/models/stat.rb index fd5e5992..7f8ef87f 100644 --- a/models/stat.rb +++ b/models/stat.rb @@ -19,7 +19,7 @@ class Stat < Sequel::Model def parse_logfiles(path) total_site_stats = {} - cache_control_ip = Resolv::DNS.new.getaddress('neocities.org') + cache_control_ip = $config['cache_control_ip'] Dir["#{path}/*.log"].each do |log_path| site_logs = {} @@ -276,4 +276,3 @@ end end end =end -