mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
when writing cache, remove elements from the user agents list. also return a message and content type when blocking a crawler.
This commit is contained in:
@ -167,7 +167,7 @@ class Middleware::RequestTracker
|
||||
|
||||
if block_crawler(request)
|
||||
log_request = false
|
||||
result = [403, {}, []]
|
||||
result = [403, { 'Content-Type' => 'text/plain' }, ['Crawler is not allowed']]
|
||||
return result
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user