mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:49:48 +08:00
FIX: use crawler layout when saving url in Wayback Machine (#7667)
This commit is contained in:
@ -62,7 +62,7 @@ module Middleware
|
||||
@is_crawler ||=
|
||||
begin
|
||||
user_agent = @env[USER_AGENT]
|
||||
if CrawlerDetection.crawler?(user_agent)
|
||||
if CrawlerDetection.crawler?(user_agent, @env["HTTP_VIA"])
|
||||
:true
|
||||
else
|
||||
user_agent.downcase.include?("discourse") ? :true : :false
|
||||
|
Reference in New Issue
Block a user