Skip to content

Commit

Permalink
Fix logout
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov committed Sep 3, 2024
1 parent 78631eb commit e4f6b47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/builder/app/routes/builder-logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export const action = async ({ request }: ActionFunctionArgs) => {
);
}

if (request.headers.get("sec-fetch-site") === "same-origin") {
// To prevent logout initiated from the builder iframe
throw new Error("Only cross-origin requests are allowed");
}

if (
false === request.headers.get("Content-Type")?.includes("application/json")
) {
Expand Down

0 comments on commit e4f6b47

Please sign in to comment.