Skip to content
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

Sync Feature with auth headers #181

Open
dtelaroli opened this issue Oct 1, 2015 · 1 comment
Open

Sync Feature with auth headers #181

dtelaroli opened this issue Oct 1, 2015 · 1 comment

Comments

@dtelaroli
Copy link

How can I set auth headers before send data to server?

@BLNorris
Copy link

BLNorris commented Dec 2, 2015

There doesn't seem to be a built in option for this, but you can add it manually in persistence.sync.js
After the xmlHttp.open on lines 36 and 52 add a like like this

xmlHttp.setRequestHeader("Authorization",  YourAuthTokenHere);

You'll have to do something similar in the persistence.jquery.js if you are using it, as it overwrites these functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants