mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: add X-Robots-Tag header for check_xhr-covered GET actions, too (#9868)
* FIX: add X-Robots-Tag header for check_xhr-covered GET actions, too see https://meta.discourse.org/t/missing-x-robots-tag/152593/3 for context * test: a spec making sure X-Robots-Tag header is present when needed /groups path responds to anonymous requests and doesn't skip `check_xhr` method, so we can use it here.
This commit is contained in:
parent
461df7d050
commit
12544c02c1
2 changed files with 7 additions and 1 deletions
|
@ -39,12 +39,12 @@ class ApplicationController < ActionController::Base
|
|||
before_action :redirect_to_login_if_required
|
||||
before_action :block_if_requires_login
|
||||
before_action :preload_json
|
||||
before_action :add_noindex_header, if: -> { is_feed_request? || !SiteSetting.allow_index_in_robots_txt }
|
||||
before_action :check_xhr
|
||||
after_action :add_readonly_header
|
||||
after_action :perform_refresh_session
|
||||
after_action :dont_cache_page
|
||||
after_action :conditionally_allow_site_embedding
|
||||
after_action :add_noindex_header, if: -> { is_feed_request? || !SiteSetting.allow_index_in_robots_txt }
|
||||
|
||||
layout :set_layout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue