Dev and Maintainer of Lemmy Userdata Migration

  • 2 Posts
  • 3 Comments
Joined 2 months ago
cake
Cake day: April 20th, 2024

help-circle
  • Sure, the code is completely client-side, simply clone it. If you’re running into CORS problems due to the file:// scheme Origin of opening a local file, simply host it as a local temporary server with something like python -m http.server .

    This is due to the two ways most instances validate Cross-Origin requests:


    • Sending Access-Control-Allow-Origin: * (allow all hosts)
    • Dynamically putting your Origin into the Origin header of the response to your requests by the backend

    file:// URLs will result in a null or file:// Origin which can’t be authorized via the second option, therefore the need to sometimes host the application via (local) webserver.