The problem is quite simple. I'm trying to stream a file with php via via nginx's "X-Accel-Redirect" header, because it's less expensive to let nginx handle everything than streaming with php.
I'm using Chrome on both pc and Android to test.
Suppose that I have a file in the public root directory: example.com/video.mp4
This works just fine, both on pc and Android.
However, if I try to stream a file with the header "X-Accel-Redirect" (suppose that it's private, and it cannot be in the public directory), using this code:
header('Content-Type: video/mp4');
header('X-Accel-Redirect: /path/to/protected/directory/video.mp4');
It works on pc, but not on Android. The requests headers seems identical, and I honestly don't know what to search.
I've also checked the headers on both devices, they seem to be identical.