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

X-Requested-With header missing #42

foobear opened this Issue Dec 18, 2017 · 1 comment


None yet
2 participants

foobear commented Dec 18, 2017

Frameworks like jQuery add a HTTP header X-Requested-With: XMLHttpRequest.
It is used to detect XHRs on the server side, for example in Rack.

Unpoly should maybe add this header by default. I understand that adding a non-standard header by default might be subject to heated discussions. 😉
Alternatively, we could allow configuring default headers like this via up.proxy.config or similar.

For the time being, I'll be using this workaround:

up.on('up:proxy:load', function(event) {
  event.request.headers['X-Requested-With'] = 'XMLHttpRequest';

This comment has been minimized.


triskweline commented Dec 18, 2017

Fixed in 0.50.1.

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