Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images failing from whitelisted urls #334

Open
3 tasks done
CodeWithOz opened this issue Sep 30, 2021 · 0 comments
Open
3 tasks done

images failing from whitelisted urls #334

CodeWithOz opened this issue Sep 30, 2021 · 0 comments

Comments

@CodeWithOz
Copy link

CodeWithOz commented Sep 30, 2021

Bug Report

Problem

I get a 401 error when I try to download images using the file-transfer plugin. My server doesn't return a 401 status at all, so it's not an issue with authentication on my server. I tracked down the code that's generating the 401 status to this line of code that sends the 401 status if the url is not in the allow list for the app. The problem is that the url should match because its base is in the allow list. I have set the allow list to allow both full and wildcard matching of the base url, yet this problem continues to happen. These are my access tags for the base url:

    <access origin="https://cloud.dev.textras.com/*" />
    <access origin="https://*.dev.textras.com/*" />
    <access origin="https://*.textras.com/*" />

And an example of an image url that's not getting downloaded is https://cloud.dev.textras.com/v1/media/round?r=32&q=100&f=images/6151be6d02dbc700142308af/thumbnail.jpeg. The image loads correctly in an img tag and in the browser.

What is expected to happen?

The image should be downloaded without problems.

What does actually happen?

Please see the problem description above

Information

Please see the problem description above

Command or Code

N/A

Environment, Platform, Device

From Android 8 to latest Android

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@breautek breautek transferred this issue from apache/cordova-android May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant