0
나는 인터넷에서 이것으로 api에 대한 json 요청을 고안하고 싶다. 그것은 무엇을합니까?이 장치 구성은 무엇을합니까?
고안 문서에서# config/initializers/devise.rb
config.http_authenticatable_on_xhr = false
config.navigational_formats = ["*/", :html, :json]
나는 인터넷에서 이것으로 api에 대한 json 요청을 고안하고 싶다. 그것은 무엇을합니까?이 장치 구성은 무엇을합니까?
고안 문서에서# config/initializers/devise.rb
config.http_authenticatable_on_xhr = false
config.navigational_formats = ["*/", :html, :json]
,
config.http_authenticatable_on_xhr = TRUE
If http headers should be returned for AJAX requests. True by default.
의 config.navigational_formats = " / " : HTML : JSON]
==> Navigation configuration
Lists the formats that should be treated as navigational. Formats like
:html, should redirect to the sign in page when the user does not have
access, but formats like :xml or :json, should return 401.
If you have any extra navigational formats, like :iphone or :mobile, you
should add them to the navigational formats lists.
The :"*/*" and "*/*" formats below is required to match Internet
Explorer requests.