mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Returning WWW-authenticate on ajaxs calls depends only on Devise.http_authenticatable_on_xhr config
This commit is contained in:
committed by
José Valim
parent
bf122d8fea
commit
5fb5efbd42
@@ -68,7 +68,11 @@ module Devise
|
||||
end
|
||||
|
||||
def http_auth?
|
||||
!Devise.navigational_formats.include?(request.format.to_sym) || (Devise.http_authenticatable_on_xhr && request.xhr?)
|
||||
if request.xhr?
|
||||
Devise.http_authenticatable_on_xhr
|
||||
else
|
||||
!Devise.navigational_formats.include?(request.format.to_sym)
|
||||
end
|
||||
end
|
||||
|
||||
def http_auth_body
|
||||
|
||||
Reference in New Issue
Block a user