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

blob: urls rejected #4676

Closed
juanevp opened this issue May 5, 2022 · 2 comments
Closed

blob: urls rejected #4676

juanevp opened this issue May 5, 2022 · 2 comments

Comments

@juanevp
Copy link

juanevp commented May 5, 2022

Describe the bug

axios throws ERR_BAD_REQUEST (meesage: Unsupported protocol blob:) when processing a url with scheme blob:

To Reproduce

This code:

const blob = new Blob(["some content"]);
const url = URL.createObjectURL(blob);
const response = await axios.get(url, {responseType: "blob"});

generates a blob url (eg, blob:http://localhost:3001/01296a6c-a41f-49b1-b59e-af71729dbb6b) which axios rejects as having an invalid scheme. But the browser supports such urls and it was working alright until #3544 which started restricting the schemes accepted.

Expected behavior

Accept the request.

Environment

  • Browser
  • axios 0.26.1 and later.
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

Hello! 👋

This issue is being automatically closed because it does not follow the issue template. Please read the issue template carefully and follow all of the instructions when opening a new issue.

Thanks

@github-actions github-actions bot closed this as completed May 5, 2022
@fukemy
Copy link

fukemy commented Jan 31, 2024

hi did  you found any solution?

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

2 participants