How can you change the 'referer' of a request in apache cordova

369 views Asked by At

I am developing an application in plain apache cordova, I am using the [cordova-plugin-advanced-http] and the app has a Media player with cordova-plugin-media.

The URL used by the Media player and m3u8 is https://example.com/playlist.m3u8 and I need to change the "referer" in order to access the file, but I donĀ“t know how:

The value that I need to change in the request

I have this in the onDeviceReady method, but nothing changes:

cordova.plugin.http.setHeader('example.com', 'REFERER', 'Value');

I also have tried this whit not luck:

cordova.plugin.http.setHeader('*', 'REFERER', 'http://example.com');
0

There are 0 answers