use cache control ip from config

This commit is contained in:
Kyle Drake 2017-05-13 23:21:42 -05:00
parent 6e873a0778
commit cfef4bc9c9
3 changed files with 3 additions and 2 deletions

View file

@ -50,3 +50,4 @@ test:
- mrteacher - mrteacher
stop_forum_spam_api_key: testkey stop_forum_spam_api_key: testkey
screenshots_url: http://screenshots:derp@screenshotssite.com screenshots_url: http://screenshots:derp@screenshotssite.com
cache_control_ip: 1.2.3.4

View file

@ -20,3 +20,4 @@ education_tag_whitelist:
- mrteacher - mrteacher
stop_forum_spam_api_key: testkey stop_forum_spam_api_key: testkey
screenshots_url: http://screenshots:derp@screenshotssite.com screenshots_url: http://screenshots:derp@screenshotssite.com
cache_control_ip: 1.2.3.4

View file

@ -19,7 +19,7 @@ class Stat < Sequel::Model
def parse_logfiles(path) def parse_logfiles(path)
total_site_stats = {} 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| Dir["#{path}/*.log"].each do |log_path|
site_logs = {} site_logs = {}
@ -276,4 +276,3 @@ end
end end
end end
=end =end