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
|
# If we are rendering HTML, preload the session data
|
||||||
def preload_json
|
def preload_json
|
||||||
# We don't preload JSON on xhr or JSON request
|
# We don't preload JSON on xhr or JSON request
|
||||||
return if request.xhr?
|
return if request.xhr? || request.format.json?
|
||||||
|
|
||||||
preload_anonymous_data
|
preload_anonymous_data
|
||||||
|
|
||||||
|
|
Reference in a new issue