social-app icon indicating copy to clipboard operation
social-app copied to clipboard

Use proxy for fetching link meta

Open renahlee opened this issue 1 year ago • 2 comments

Overview

This PR:

  • Fixes link embeds (thank you @Jacob2161 for making this possible ❤️ )
  • Removes the package he, which is no longer used

Looks like:

Screenshot 2023-05-17 at 11 33 14 AM

Known issues:

Twitter links are currently failing. There may be other instances as well, so in those cases, we forward the error from the proxy to the composer:

Screenshot 2023-05-17 at 11 33 03 AM

renahlee avatar May 17 '23 18:05 renahlee

Yeah, there will be some availability/anti-bot issues to deal with. We're just extracting the metadata that they publish explicitly for the purpose of card-like summaries but :man_shrugging:

Jacob2161 avatar May 17 '23 18:05 Jacob2161

@Jacob2161 If you set the User-Agent header to Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) if the URL hitting your proxy contains the hostname twitter.com, the error above will go away. 😄

ummjackson avatar May 19 '23 05:05 ummjackson