Retain authorization header when a redirect happens to a different hostname problem
Which API doesn't behave as documented, and how does it misbehave?
await _player.setAudioSource(
ConcatenatingAudioSource(
children:
queue.map((item) => AudioSource.uri(Uri.parse(item.id),headers: {"Authorization": "Bearer token"} )).toList(),
),
initialIndex: index);
this is my code. my problem is that just_audio Retain authorization header when a redirect happens to a different hostname. and I don't want Authorization header in target of redirect. my redirect http code response is 302.
Minimal reproduction project To Reproduce (i.e. user steps, not code)
Error messages Error 400
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidArgument</Code>
<RequestId>tx00000000000000173495b-0061223872-114916df-de-htz-1</RequestId>
<HostId>114916df-de-htz-1-georep</HostId>
</Error>
Expected behavior don't send first URL headers to second URL after redirect
Screenshots Desktop (please complete the following information):
- OS: Ubuntu 20.0.4
- Browser: Chrome Smartphone (please complete the following information):
- Device: Mi 9
- OS: Android 10
Flutter SDK version
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.18363.1734], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.59.1)
[√] Connected device (2 available)
• No issues found!
Additional context I think it is better that have a config for Retain authorization header when a redirect happens to a different hostname.
Can you please provide a minimal reproduction project and user steps as per the instructions?