mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-25 13:33:51 -04: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue