anyproto / anytype-heart

Shared library for Anytype clients

Home Page:https://anytype.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some links fail to fetch content due to Cloudflare

schalkneethling opened this issue · comments

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing issues and didn't find any that were similar
  • I have considered creating a pull request with fixes instead of a bug report and want to proceed

Current Behavior

For some sites (I have experienced it with DigitalOcean and Producthunt so far), when you paste a link into Anytype and choose "Create bookmark", you get the following instead of the title and description.

Attention required! | Cloudflare
Please enable cookies. You are unable to access digitalocean.com. Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed …

Screenshot of the above text in Anytype

One can right-click, open as object, and then edit the bookmark details, but this is not ideal. I am not sure whether there is a workaround for this. Perhaps the fetch request needs to set some specific headers to "fake" the cookie?

Expected Behavior

All links that are turned into a bookmark work the same way, and the Cloudflare challenge is handled gracefully.

Steps To Reproduce

  1. Paste the following link into Anytype: https://www.digitalocean.com/community/tutorials/how-to-create-an-intelligent-chatbot-in-python-using-the-spacy-nlp-library?mkt_tok=MTEzLURUTi0yNjYAAAGKjCyZlsAG3D1-BrHStQfGFDmF5fS_q9wqcvfdeZGaFgeUzHkn7VamozXqamkCdOZtApXCMwayerDDJCJG20i0P3b_RZWfoVrSSKJqVWDuDw
  2. Choose, "Create a bookmark"
  3. The bookmark has the title and description as mentioned in the current behavior section above.

Environment

- OS: MacOS Ventura
- Version: 0.33.3

Anything else?

Update: When I created the issue, I noticed the URL contained some query parameters. I wondered whether it might be triggering the Cloudflare intercept. I removed the query string, but the problem remains.