2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Merge pull request #5700 from discourse/crawl-block

FEATURE: control web crawlers access with white/blacklist
This commit is contained in:
Neil Lalonde 2018-03-27 15:06:03 -04:00 committed by GitHub
commit 7311023a52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 734 additions and 97 deletions

View file

@ -0,0 +1,11 @@
class CreateWebCrawlerRequests < ActiveRecord::Migration[5.1]
def change
create_table :web_crawler_requests do |t|
t.date :date, null: false
t.string :user_agent, null: false
t.integer :count, null: false, default: 0
end
add_index :web_crawler_requests, [:date, :user_agent], unique: true
end
end