Skip to content

Commit

Permalink
Add emergency hotfix for rejected connections to lemmy.world (#100)
Browse files Browse the repository at this point in the history
Background:

Yesterday, reverse proxied requests on lemmy.app started being
rejected from wefwef.app due to rate limiting built into lemmy
on lemmy.world.

lemmy.world will shortly enable CORS.

Note: This hotfix may only be deployed to wefwef.app.

Future versions of lemmy will enable CORS * by default like
Mastodon, which will completely resolve this issue.
  • Loading branch information
aeharding authored Jun 30, 2023
1 parent a1aa61c commit 5c8e6cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/services/lemmy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { LemmyHttp } from "lemmy-js-client";

function buildBaseUrl(url: string): string {
if (url === "lemmy.world") {
return `https://lemmy.world`;
}

return `${location.origin}/api/${url}`;
}

Expand Down

0 comments on commit 5c8e6cd

Please sign in to comment.