mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 15:42:32 -05:00
block search bots
This commit is contained in:
1 parent
621431166b
commit
dbf446efe1
3 files changed
+55
No files matched your search
@@ -34,6 +34,12 @@ module Api
|
||||
@record = attachment.record
|
||||
@record = @record.record if @record.is_a?(ActiveStorage::Attachment)
|
||||
|
||||
if DetectBrowserDevice.search_bot?(request.user_agent)
|
||||
Rollbar.warning("Search bot: #{@record.class.name} #{@record.id}") if defined?(Rollbar)
|
||||
|
||||
raise ActionController::RoutingError, 'Not Found'
|
||||
end
|
||||
|
||||
authorization_check!(attachment, @record, exp)
|
||||
|
||||
if request.headers['Range'].present?
|
||||
|
||||
Reference in new issue
Block a user