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…
Reference in New Issue