We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ea6dde commit 5bc88bbCopy full SHA for 5bc88bb
src/services/tools.ts
@@ -43,6 +43,14 @@ export const getSecureUrl = async (mediaUrl: string) => {
43
}, finalUrl)
44
if (redirectResponse?.request?.responseURL) {
45
finalUrl = redirectResponse.request.responseURL
46
+
47
+ /*
48
+ Sometimes the final redirected URL will begin with http. Change it to https
49
+ to avoid "cleartext not allowed" errors on Android.
50
+ */
51
+ if (mediaUrl.indexOf('http://') >= 0) {
52
+ finalUrl = mediaUrl.replace(/http:\/\//g, 'https://')
53
+ }
54
}
55
56
} catch (error) {
0 commit comments