mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 12:57:55 +08:00
PERF 🐎 Don't calculate preload data for non-xhr json requests
This will help out anyone querying as API instead of through a browser.
This commit is contained in:
parent
c2e716cd88
commit
fb72e2665f
@ -155,7 +155,7 @@ class ApplicationController < ActionController::Base
|
||||
# If we are rendering HTML, preload the session data
|
||||
def preload_json
|
||||
# We don't preload JSON on xhr or JSON request
|
||||
return if request.xhr?
|
||||
return if request.xhr? || request.format.json?
|
||||
|
||||
preload_anonymous_data
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user