Cookies not sent by OPTIONS requests

The Angular 1 app I'm working on uses cookie authentication. The problem is that OPTIONS

no cookie is sent when the calls are made and the server tries to redirect the user to re-login. Just wondering whose "fault"? Server (Azure API Applications) or frontend? If an interface, how do I send a cookie to the call OPTIONS

? I am using augular-resource

and configured it like below:

$httpProvider.defaults.withCredentials = true

+1


source to share


1 answer


The specification states:

If not, please inquire before flying. Retrieve the request url from the original origin source using the origin origin as overriding referrer origin with manual redirect flag and cookies checked using OPTIONS method and with the following additional restrictions ... Exclude user credentials .

and



The term user credentials, for the purposes of this specification, means cookie , HTTP authentication, and client SSL certificates that will be sent based on the user agent of previous origin interactions. In particular, this does not apply to proxy authentication or the Origin header.

Thus, the client should not send cookies, and the server should be able to respond to a pre-check request without requiring authentication first.

+5


source







All Articles