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

if remote or remoteBaseUrl starts with a '/', prefix it with location.origin #121

Open
gr2m opened this issue Aug 25, 2016 · 0 comments
Open

Comments

@gr2m
Copy link
Member

gr2m commented Aug 25, 2016

When my app runs at http://example.com and I run this code

var store = new Store('mydb', {
  remote: '/store/api/mydb'
})
store.sync()

Then store.sync() does not send AJAX requests to http://example.com/store/api/mydb, instead it syncs with another database in browser with the name '/store/api/mydb', which is rather confusing.

What we want is to check if the remote or remoteBaseUrl option starts with a /, and if it does, prefix it with location.origin

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

1 participant