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

Link Cards not working? #1100

Closed
jolyonralph opened this issue Aug 2, 2023 · 11 comments
Closed

Link Cards not working? #1100

jolyonralph opened this issue Aug 2, 2023 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@jolyonralph
Copy link

Describe the bug
I am unable to get the link cards from my site to work. Checking the logs on my site it doesn't appear there was any attempt to access this particular page (chosen for the test)

To Reproduce

Steps to reproduce the behavior:

  1. Add a link to https://mindat.org/photo-918742.html and see if a link card appears

Expected behavior

A link card appearing

Details

  • Operating system: Chrome, Windows 11

Additional context

This might be as documentation issue about the link cards. Need to know how they are obtained, what user agent to search for in the logs, because it may be our system has detected automated access pretending to be a regular browser and blocked it. I can whitelist BlueSky IF I know either the IP range of the crawlers or there is a user agent for bsky access to the page.

Here is an example of how it appears in my log when the same link is posted in Twitter, which is expanded correctly to show the image.

199.16.157.169 - - [02/Aug/2023:23:24:14 +0000] "GET /photo-918742.html HTTP/1.1" 200 13883 "-" "Twitterbot/1.0"

image
@jolyonralph jolyonralph added the bug Something isn't working label Aug 2, 2023
@dholms
Copy link

dholms commented Aug 3, 2023

This is actually logic in the client application, so i'll transfer the issue over there

@dholms dholms transferred this issue from bluesky-social/atproto Aug 3, 2023
@pfrazee
Copy link
Collaborator

pfrazee commented Aug 3, 2023

Actually we use the cardyb service now, so this is a @Jacob2161 question

@Jacob2161
Copy link
Contributor

This is due to the fact that Cloudflare is blocking the cardyb service's request. I'm in contact w/Cloudflare and they've offered to help, so this should be resolved soon.

@jolyonralph
Copy link
Author

Thank you all!

@MichaelGHUser
Copy link

Will this address link cards not showing up in Discord? I have been having to use a third-party redirect for previews to show up.

@Jacob2161
Copy link
Contributor

Cloudflare has very kindly attempted to fix this issue for us, so for example link cards for https://mindat.org/photo-918742.html should work now.

@Danie10
Copy link

Danie10 commented Oct 30, 2023

@Jacob2161 that test link is also not showing any image returned in the card for me - using the desktop browser to Bluesky. Found this issue as I've been having the same problem with my own website sites (also behind Cloudflare) and it seemed to be a Cloudflare related issue, as other links do show the image fine with the card view.

Maybe it is also an issue with the browser version of Bluesky?

@Jacob2161
Copy link
Contributor

@Danie10 that link https://mindat.org/photo-918742.html is now returning a 403 Forbidden response and it seems to be done at the server itself not by Cloudflare.

<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

If you want to share a link to your web site I'd be happy to check what the problem is and try to fix it.

@Danie10
Copy link

Danie10 commented Oct 30, 2023

Hi @Jacob2161 thanks yes an example post link is https://gadgeteer.co.za/how-to-protect-ssh-login-with-fail2ban-a-beginners-guide/. It does have Open Graph tags set, and is pulling through OK to Twitter and through my RSS feed to other sites. But yes it does have Nginx PM in front too.

@Jacob2161
Copy link
Contributor

@Danie10 it looks like grabbing all the meta data is working just fine but the image isn't being served with a Content-Type: image/webp as the cardyb service currently requires. Maybe it shouldn't require a valid header but it does right now.

If you want to change that on your end, it may be that /etc/nginx/mime.types is missing a image/webp webp line on your server or something like that.

@Danie10
Copy link

Danie10 commented Oct 31, 2023

Ah thanks a lot @Jacob2161 - yes when I tried one of my older posts that still used JPG, it created the card fine with the image pulled in. Well that explains my issue then and it is not Cloudflare. I'll look into what you suggested around the serving of the WEBP format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants