nitter icon indicating copy to clipboard operation
nitter copied to clipboard

Nitter.net images not embedding on Discord

Open net-tech opened this issue 1 year ago • 9 comments

Hi there,

I'm having a strange issue on Discord when trying to use a Nitter Image URL such as https://nitter.net/pic/media%2FFqfM3xIXoAINbKM.jpg in a Embed. The image will not appear however any other image jpg from the web works just fine: Nitter Image Test CleanShot 2023-03-05 at 23 36 03@2x A random JPG from Wikipedia CleanShot 2023-03-05 at 23 36 12@2x

I asked in a development server on Discord and was told

that host may have some sort of hotlink protection or something that prevents the image from being loaded from another host just tried it and it also won't embed, so its an issue with the image or the image host

So I'm just opening this to ask whether that is the case. Thanks.

net-tech avatar Mar 05 '23 22:03 net-tech

No idea why this is, another host (nitter.nl) with no unnecessary security headers also won't embed.

zedeus avatar Mar 05 '23 23:03 zedeus

I've made my bot upload Nitter's image to imgur for now and embed that.

net-tech avatar Mar 09 '23 11:03 net-tech

As of today, Discord released an Embed Debug tool. Custom instance embeds work fine, however, when debugging why nitter.net images still won't embed using the debug tool, I got this reason from the debugger @zedeus CleanShot 2023-08-11 at 22 48 50@2x

net-tech avatar Aug 11 '23 20:08 net-tech

I guess it's probably due to the IP address/range being blocked by my extensive cloud blocking rules. Any idea which IP(s) they might use to pull embeds?

zedeus avatar Aug 11 '23 20:08 zedeus

I guess it's probably due to the IP address/range being blocked by my extensive cloud-blocking rules. Any idea which IP(s) they might use to pull embeds?

Not sure which exact ones. All I know is they use Google Cloud and Cloudflare as far as their infrastructure goes.

net-tech avatar Aug 11 '23 20:08 net-tech

That's tricky, I don't want to unban GCP ranges because of all the abuse that comes from them, not sure what to do about this.

zedeus avatar Aug 11 '23 20:08 zedeus

That's tricky, I don't want to unban GCP ranges because of all the abuse that comes from them, not sure what to do about this.

If you're talking about DDoS attacks, it might be useful to put nitter.net behind CloudFlare too. If it's something else, you could report it to GCP via their Abuse Report Form. However, I understand how this could be tedious. I guess we could keep this issue open and pin it in that case.

net-tech avatar Aug 11 '23 21:08 net-tech

Can you configure your firewall to do a reverse DNS lookup on the connecting address?

In my quick testing, I saw discord crawling from 35.227.62.178 and 35.196.132.85 with UA Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com).

dig -x 35.227.62.178 comes up with crawl-35-227-62-178.ptr.discord.com, dig -x 35.196.132.85 comes up with crawl-35-196-132-85.ptr.discord.com.

flaviut avatar Nov 03 '23 00:11 flaviut

Is there any follow up or fix on this subject?

DarkDoccieDutch avatar Apr 11 '24 20:04 DarkDoccieDutch