mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FEATURE: add no_index header if robots is disabled
Expand SiteSetting.allow_index_in_robots_txt so it also adds a noindex header if set to false. This makes sure that nothing is indexed even if it somehow reaches Google.
This commit is contained in:
@ -44,7 +44,7 @@ class ApplicationController < ActionController::Base
|
||||
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? }
|
||||
after_action :add_noindex_header, if: -> { is_feed_request? || !SiteSetting.allow_index_in_robots_txt }
|
||||
|
||||
layout :set_layout
|
||||
|
||||
|
Reference in New Issue
Block a user