feat(frontend): Implement glitch-soc logout

This commit is contained in:
Jesse Wierzbinski 2024-04-15 21:23:06 -10:00
parent 59455f9ece
commit 10b4378a68
No known key found for this signature in database
3 changed files with 43 additions and 1 deletions

View file

@ -116,6 +116,12 @@ export const handleGlitchRequest = async (
path = "/auth/sign_in.html";
}
if (path === "/auth/sign_out") {
if (req.method === "POST") {
return redirect("/api/auth/mastodon-logout", 307);
}
}
// Redirect / to /index.html
if (path === "/" || path === "") path = "/index.html";
// If path doesn't have an extension (e.g. /about), serve index.html