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

image-proxy and Discord #48

Closed
SentientCrab opened this issue Feb 9, 2020 · 9 comments
Closed

image-proxy and Discord #48

SentientCrab opened this issue Feb 9, 2020 · 9 comments

Comments

@SentientCrab
Copy link

SentientCrab commented Feb 9, 2020

image-proxy fails on discord, says "This content is no longer available"

Edit: example url for testing https://cdn.discordapp.com/attachments/473214112969654282/676078778396573706/unknown.png

@soruly
Copy link
Owner

soruly commented Feb 13, 2020

Yes this is an known issue. I'm not sure what was causing it. Probably because both Discord and trace.moe are served via cloudflare, which may be blocked by some firewall settings on Discord's server side?

@SentientCrab
Copy link
Author

What about a setting to disable image proxy and do the request client side?

@soruly
Copy link
Owner

soruly commented Feb 14, 2020

What about a setting to disable image proxy and do the request client side?

This would be blocked by browsers' security policy

@SentientCrab
Copy link
Author

Oh duh, always forget about CORS being bad

@ImUrX
Copy link

ImUrX commented Feb 15, 2020

CORS has its own reasons for existing... and its configurable by the site :p

@soruly
Copy link
Owner

soruly commented Feb 15, 2020

CORS has its own reasons for existing... and its configurable by the site :p

Yes it's possible to load the image with CORS, but then the image would become "tainted canvas", which cannot be convereted to binary format to via toBlob or toDataURI.

@ImUrX
Copy link

ImUrX commented Feb 15, 2020

sorry, not saying it should be done. i havent checked the codebase :p

@soruly
Copy link
Owner

soruly commented Apr 2, 2020

Resolved in da5a113

ref: https://github.com/soruly/trace.moe-image-proxy (Deployed to ZEIT)

@soruly
Copy link
Owner

soruly commented Oct 12, 2020

now.sh (ZEIT, a.k.a Vercel) blocked the image proxy because it's not allowed in its fair use policy. Now switching back to cloudflare workers for the moment. Need to look for new solutions.

@soruly soruly reopened this Oct 12, 2020
@soruly soruly closed this as completed in 0db2d35 Oct 12, 2020
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

3 participants