mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: new 'Discourse-Render' HTTP header
This commit is contained in:
parent
34ac199be7
commit
75eebc904e
2 changed files with 18 additions and 11 deletions
|
@ -102,6 +102,13 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def set_layout
|
||||
case request.headers["Discourse-Render"]
|
||||
when "desktop"
|
||||
return "application"
|
||||
when "crawler"
|
||||
return "crawler"
|
||||
end
|
||||
|
||||
use_crawler_layout? ? 'crawler' : 'application'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue