-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
🐛 Fixed automatic Medium.com bookmark creation #26294
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
Conversation
28facef to
96be55e
Compare
ref https://linear.app/ghost/issue/ONC-1429/ ref https://linear.app/ghost/issue/ONC-1451/ - Medium.com and Itch.com have added Cloudflare bot protection (or CF bot protection has changed) on their oEmbed endpoint that was preventing our oEmbed service from using it to create embeds when pasting links - Changed the user-agent our oEmbed service uses to match latest Chrome which appears to bypass the current Cloudflare restrictions
96be55e to
3209c1f
Compare
WalkthroughThe pull request updates the USER_AGENT string in the oEmbed service. The original user agent has been replaced with a Chrome/Chromium-based user agent. This modification changes the headers sent in external requests made by the oEmbed service when fetching pages. The change is minimal, affecting only a single line, and does not alter the service's logic or control flow. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@kevinansfield thanks! I've tried to make these same requests with the updated user agent from a staging server, and I've still gotten 403s — I think the requests are being blocked partly because they're coming from datacenter IPs. I'm going to deploy this to a staging site to make sure it's not something I'm doing wrong, but I don't think this will be enough to get around the blocks in staging/production. |
cmraible
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref https://linear.app/ghost/issue/ONC-1429/
ref https://linear.app/ghost/issue/ONC-1451/