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

Cannot set per request headers. Headers are global. #14

Open
DylanVann opened this issue Jun 20, 2017 · 3 comments
Open

Cannot set per request headers. Headers are global. #14

DylanVann opened this issue Jun 20, 2017 · 3 comments
Labels

Comments

@DylanVann
Copy link
Owner

The way SDWebImage works headers set on FastImage are global.

See here.

So the latest requested image will e.g. overwrite the token header for any other queued images.

This is really sloppy and will probably lead to bugs in some people's code down the line. This may tie into #13 .

@DylanVann DylanVann changed the title Cannot set per request headers. Jun 20, 2017
@DylanVann DylanVann added the bug label Jun 20, 2017
@bunnyc1986
Copy link

Hi Dylan, did you have a chance to look into this issue? What's next?
I am blocked by this issue because I have to use different authentication header on each image.

@DylanVann
Copy link
Owner Author

@bunnyc1986 That sucks. It's a hard issue. The best route might be to submit a PR to SDWebImage to allow per-request headers. Alternatively there might be another native library that could be used instead, see: #13

I don't think I'll be able to look into this anytime soon though, sorry.

@avegrv
Copy link

avegrv commented Jun 7, 2019

Any updates? This is critical bug your library 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants