mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 18:41:07 +08:00
FIX: add 'noindex' header to rss feed responses.
This commit is contained in:
@ -47,6 +47,8 @@ class UsersController < ApplicationController
|
||||
:admin_login,
|
||||
:confirm_admin]
|
||||
|
||||
after_action :add_noindex_header, only: [:show]
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
@ -73,8 +75,6 @@ class UsersController < ApplicationController
|
||||
track_visit_to_user_profile
|
||||
end
|
||||
|
||||
response.headers['X-Robots-Tag'] = 'noindex'
|
||||
|
||||
# This is a hack to get around a Rails issue where values with periods aren't handled correctly
|
||||
# when used as part of a route.
|
||||
if params[:external_id] && params[:external_id].ends_with?('.json')
|
||||
|
Reference in New Issue
Block a user