mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
PERF: avoid preloading json in cases where it is not needed
(uploads / avatars / non GET requests)
This commit is contained in:
@ -4,7 +4,7 @@ require_dependency 'single_sign_on'
|
||||
class SessionController < ApplicationController
|
||||
|
||||
skip_before_filter :redirect_to_login_if_required
|
||||
skip_before_filter :check_xhr, only: ['sso', 'sso_login', 'become', 'sso_provider']
|
||||
skip_before_filter :preload_json, :check_xhr, only: ['sso', 'sso_login', 'become', 'sso_provider']
|
||||
|
||||
def csrf
|
||||
render json: {csrf: form_authenticity_token }
|
||||
|
Reference in New Issue
Block a user