mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
PERF: stop doing work for HEAD requests on topics
This commit is contained in:
@ -620,6 +620,12 @@ class TopicsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def perform_show_response
|
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])
|
topic_view_serializer = TopicViewSerializer.new(@topic_view, scope: guardian, root: false, include_raw: !!params[:include_raw])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
Reference in New Issue
Block a user