Firefox redirect response to xhr request

Suppose we have an xhr 'POST' request that returns a 'redirect' status code. In this case, the browser sends an additional xhr 'GET' to the given URL. I'm not sure who is executing this chain of calls: the browser itself or the js library (using MooTools).

The problem is that the second GET request is not recognized by the xhr server: It does not have an "X-Requested-With" header containing "XMLHttpRequest"

The problem appears only in Firefox, but not in Webkit. So, suppose this is not due to a js library error.

Does anyone have any ideas how to fix this?

+3
source share
1 answer

XHR / browser should be redirected internally.

Firefox doesn't seem to forward custom headers?

It sounds like you should report a bugzilla error

+1
source

Source: https://habr.com/ru/post/1737860/


All Articles