mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-01 09:39:51 -04:00
PERF: stop doing work for HEAD requests on topics
This commit is contained in:
parent
a25a8115e8
commit
b4dfb84f37
1 changed files with 6 additions and 0 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Reference in a new issue