-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add support to set withCredentials on ahoy config #19
Conversation
This option is required on ajax requests to send credentials such as cookies, authorization headers or TLS client certificates from a different domain
Hey @gualopezb, thanks for the PR 👍 and sorry for the delay. I think it'd be good to document this feature in the readme, including the security implications. |
Thanks @gualopezb 👍 I'll test this out once things are in a good place for the 1.0 release. Will see if I can include it there (otherwise, a release shortly after). |
Hey @gualopezb, can you explain more about your setup for cross-domain tracking? (where cookies are set, etc?) Also, looks like the option was only added to jQuery. Can you add it to non-jQuery AJAX requests? From what I can tell, |
@ankane sure, I can add more details about the setup for cross-domain tracking. Do you mean improve the documentation in the README, right? Regarding the non-jQuery AJAX requests, I think we can use the fetch API with keepalive flag set to true instead of |
@ankane according to the fetch spec, a request has an associated keepalive flag:
I was trying to make a request using this option set, and including the
So we definitely would need to make AJAX requests when the option |
@ankane I renamed the |
👍 great addition |
Merged, thanks @gualopezb 👍 |
This option is required on ajax requests to send credentials such as cookies, authorization headers or TLS client certificates from a different domain