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

Avoid redirecting images in a custom instalation of Imgur #88

Closed
wants to merge 1 commit into from

Conversation

malditogeek
Copy link

Fixes this very unfortunate bug https://github.com/gitterHQ/gitter/issues/798

:shipit:

@iparamonau
Copy link
Member

Ouch!

The re-redirect plugin isn't the cause though. It's the Imgur's oEmbed endpoint that is messing it up. Re-direct was there for a reason, as Imgur wasn't returning proper data for direct image links. They still don't for GIFV files, for example, and it is important for us.

Your PR would remove all meta data, app embeds and GIFv support for direct file links :\

So. I just blacklisted oEmbed on i.stack.imgur.com domain and with this approach, your PR isn't required. The links are recognized just as files.
Here's the result with old code: http://iframely.com/debug?uri=http%3A%2F%2Fi.stack.imgur.com%2FDFn7t.jpg

You should be getting the same when your Iframely instance pulls newer version of whitelist.

Are there any other custom installation domains?

@Pokechu22
Copy link

There aren't any other custom installation domains as far as I can tell (and the SSL certificate only lists i.stack.imgur.com).

@iparamonau
Copy link
Member

OK, so Imgur has fixed it on their side too: they just disabled oEmbed responses for Stack URLs.
http://api.imgur.com/oembed.json?url=http%3A%2F%2Fi.stack.imgur.com%2FDFn7t.jpg

So I guess we can close the PR now.

@iparamonau iparamonau closed this Jul 30, 2015
@malditogeek
Copy link
Author

@iparamonau ah sweet, reverted the commit on our instance and it's working fine now. Cheers! 👍

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

Successfully merging this pull request may close these issues.

3 participants