diamond (she/they)

  • 2 Posts
  • 14 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle








  • Thank you for the reply, I really appreciate it! Currently, my app has been migrated to the WS API so development can continue for now until the WS is removed completely in a later release or Lemmy addresses the CORS issue upstream.

    As for the security concerns, I believe that most of them are addressed in this comment that is in the particular issue that I linked above.

    It’s worth noting that CORS really only applies in the browser and that the WS API currently bypasses this protection (hence me being able to continue with the development).


  • The websocket needs the right URL or it won’t work, you can’t always assume the websocket endpoint is at the root of the domain.

    Right. I was reading a code snippet from somewhere else where they called into the root path, but the library that they were using probably did the appending in the background which I didn’t know.

    That’s annoying, though, because setting up the right CORS headers to allow arbitrary online clients is a pain and I suspect many instance admins won’t do it.

    There is an issue upstream tracking this. For now, I only mostly use Beehaw, so that’s fine.

    As a side note, are you implementing the API from scratch? Because there’s a Javascript (Typescript) API that gets auto generated from the Lemmy sources that’s ready to use (supports both REST and WS).

    Nope, I’m using lemmy-js-client. The WS part of it doesn’t do much, so I didn’t bother using it. The LemmyWebsocket type wasn’t also in the main import for some reason, but that wasn’t much of an issue.





  • I would get downvoted to oblivion if people can downvote me, but I think people are really overreacting w/ the Meta stuff. I already ranted about it a bit on my blog article, but the gist of it is:

    Nothing has even happened yet. There’s no “Meta instance” federating right now, and even if there is, you and your community has the power to just… block them off when it happens! The code is open, the community is yours, and you can do whatever you want, but your actions so far have involved attacking and harassing this person off the Fediverse, something that they contributed so much towards!

    All the reaction that I’ve seen are just preemptive “get off my turf” reaction. It makes me annoyed that people are just going along with this mob.