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

Set Cache-Control on rest resources #2246

Merged
merged 1 commit into from May 17, 2016
Merged

Set Cache-Control on rest resources #2246

merged 1 commit into from May 17, 2016

Conversation

edmundoa
Copy link
Contributor

Some browsers cache Ajax requests (like IE/Edge), so we need to set the Cache-Control header to no-cache to avoid caching issues.

In order to only set cache headers into requests coming from browsers, we now set the X-Requested-With header in all our XHR requests coming from the web interface.

Fixes #2243.

This PR should also be merged into master.

Some browsers cache rest requests (like IE/Edge), so we need to set the
Cache-Control header to no-cache to avoid caching issues.

In order to only set cache headers into requests coming from browsers,
we now set the X-Requested-With header in all our XHR requests.
@joschi
Copy link
Contributor

joschi commented May 17, 2016

LGTM. 👍

@joschi joschi merged commit 20c32a6 into 2.0 May 17, 2016
@joschi joschi deleted the issue-2243 branch May 17, 2016 16:08
@joschi joschi self-assigned this May 17, 2016
joschi pushed a commit that referenced this pull request May 17, 2016
Some browsers cache rest requests (like IE/Edge), so we need to set the
"Cache-Control" header to no-cache to avoid caching issues.

In order to only set cache headers into requests coming from browsers,
we now set the X-Requested-With header in all our XHR requests.
(cherry picked from commit 20c32a6)
@edmundoa
Copy link
Contributor Author

It seems that these changes also have the added benefit of removing that annoying login popup window triggered in the login page by an Ajax request.

@edmundoa
Copy link
Contributor Author

Forget my last comment, that was already fixed in #2157

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

Successfully merging this pull request may close these issues.

None yet

2 participants