mirror of
https://github.com/neocities/neocities.git
synced 2025-08-01 23:31:52 +02:00
mechanism to report spam ips to stopforumspam
This commit is contained in:
parent
7be37ce595
commit
bedc08cb58
10 changed files with 38 additions and 25 deletions
10
workers/stop_forum_spam_worker.rb
Normal file
10
workers/stop_forum_spam_worker.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
class StopForumSpamWorker
|
||||
include Sidekiq::Worker
|
||||
sidekiq_options queue: :stop_forum_spam, retry: 1, backtrace: true
|
||||
|
||||
def perform(opts)
|
||||
opts.merge! api_key: $config['stop_forum_spam_api_key']
|
||||
res = HTTP.post 'https://stopforumspam.com/add', opts
|
||||
puts res.inspect
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue