-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session renewed on cross-domain preflight requests #64
Comments
Do you have any link (from a trustable source) that documents this? If that's the case, I'll find a way to incorporate your conditional into this library's code. |
https://fetch.spec.whatwg.org/#cors-preflight-fetch Cookies belongs to the forbidden header name list I found these references from https://stackoverflow.com/questions/41760128/cookies-not-sent-on-options-requests |
Ok, there are some things to notice here:
Nonetheless, I understand that you're having a problem with your client-side application. PS: I'll try to dig a little perhaps I'm wrong. But some sample code would be helpful. |
I appreciate you taking the time to dig into this, thanks. So I exchange data without php session, using an encryption / decryption that allows me to secure the exchanges. Sorry, I couldn't provide you with a code example, but making an exit on the options requests had solved this problem for me. Translated with www.DeepL.com/Translator (free version) |
Hello,
Thanks for your great work.
I'm using your session manager on an android/ios application and got a problem caused by the cross-domain requests.
The browser sends a preflight request with OPTIONS method to allow or reject the request depending on CORS.
I don't know exactly what happens, but if the request goes to the session it randomly breaks the script.
Preflight requests are not supposed to return cookies, so I added this code at the beginning of my API index to intercept the OPTIONS requests and prevent the script to go further:
It solved my issue, but maybe you have a better way to avoid this problem?
And maybe this report could help others users ...
The text was updated successfully, but these errors were encountered: