PERF: stop doing work for HEAD requests on topics

This commit is contained in:
Sam 2016-08-17 10:04:23 +10:00
parent a25a8115e8
commit b4dfb84f37
1 changed files with 6 additions and 0 deletions

View File

@ -620,6 +620,12 @@ class TopicsController < ApplicationController
end
def perform_show_response
if request.head?
head :ok
return
end
topic_view_serializer = TopicViewSerializer.new(@topic_view, scope: guardian, root: false, include_raw: !!params[:include_raw])
respond_to do |format|