mirror of
https://github.com/neocities/neocities.git
synced 2025-07-21 01:56:03 +02:00
further cleanups to filtering code
This commit is contained in:
parent
a7ee94b0c7
commit
aa56561dff
6 changed files with 52 additions and 16 deletions
|
@ -294,6 +294,7 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def banned_ip?(ip)
|
||||
return false if ENV['RACK_ENV'] == 'production' && ip == '127.0.0.1'
|
||||
return true if Site.where(is_banned: true).
|
||||
where(ip: hash_ip(ip)).
|
||||
where(['updated_at > ?', Time.now-BANNED_TIME]).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue