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

Need "access-control-expose-headers : content-range" to make dgrid's Pagination work with JsonRest #31

Open
websoftix opened this issue Jul 18, 2014 · 0 comments

Comments

@websoftix
Copy link

I'm testing pintura and I started from persevere-example-wiki where I'm using the MySQL store to load a list of items into a dgrid (that uses Pagination extension and dojo/store/JsonRest as store).

The visible effect is that the dgrid shows "1 - 1 of 0" in the footer and when you try to navigate to next page it will get all the products.

The headers are returned correctly by pintura but the JsonRest refuses to use content-range and gives error that is an unsafe header.

To make it work I added the following code into pintura/jsgi/rest-store.js after line 122:

if (request.crossSite) { headers["access-control-expose-headers"] = "content-range"; }

I'm not sure this is the best place to solve it, maybe it can be added in xsite.js but that's why I submited this issue before makeing a PR.

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