A platform for community discussion. Free, open, simple.
STYLE: use a consistent method of adding the noindex header
Michael Brown7eb6f955c21d
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rbindex 003b1914d1c..55da4106dda 100644--- a/app/controllers/users_controller.rb+++ b/app/controllers/users_controller.rb@@ -112,7 +112,7 @@ class UsersController < ApplicationController]skip_before_action :redirect_to_profile_if_required, only: %i[show staff_info update]- before_action :add_noindex_header, only: %i[show my_redirect]+ before_action :add_noindex_header, only: %i[show summary my_redirect]allow_in_readonly_mode :admin_loginallow_in_staff_writes_only_mode :email_login, :password_reset_update@@ -517,8 +517,6 @@ class UsersController < ApplicationController)raise Discourse::NotFound unless guardian.can_see_profile?(@user)- response.headers["X-Robots-Tag"] = "noindex"-respond_to do |format|format.html do@restrict_fields = guardian.restrict_user_fields?(@user)