this post was submitted on 13 Jun 2023
18 points (100.0% liked)
Lemmy.World Announcements
29105 readers
13 users here now
This Community is intended for posts about the Lemmy.world server by the admins.
Follow us for server news ๐
Outages ๐ฅ
https://status.lemmy.world
For support with issues at Lemmy.world, go to the Lemmy.world Support community.
Support e-mail
Any support requests are best sent to [email protected] e-mail.
Report contact
- DM https://lemmy.world/u/lwreport
- Email [email protected] (PGP Supported)
Donations ๐
If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.
If you can, please use / switch to Ko-Fi, it has the lowest fees for us
Join the team
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
hmm, interesting. It works when I do it in my node environment, but the moment the browser tries to make the request it fails.
The error message tells you why it failed
oh, it's because lemmy.world doesn't allow api requests from lemmy.ml, and vice-versa. Is it possible that there's a workaround?
Make a bot account on the other server
I'm making a bookmarklet to transfer followed communities from one instance to another
Whoever would be using that bookmarklet would need to have accounts on both instances.
that's not the issue unfortunately, websites usually don't allow api requests to be made from another website, I fixed it using this github repo
@[email protected] - it has to do with CORS (says in the error message) - You generally can't make cross-origin requests in the browser unless it is explicitly allowed. This is purely a browser limitation, which is why it works in your node environment. But if you open the console on any random website and try to call fetch() to that API, it's going to fail on any site other than lemmy.world.
yeah that's what I observed after a few more trying, is there a possible workaround to this?
Anything you do cross-origin will have to be done in a server-like environment instead of in the browser.
Works for me on Firefox