migrated
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
import type { APIEvent } from "@solidjs/start/server";
|
||||
import { getCookie, getEvent, setCookie } from "vinxi/http";
|
||||
import { getEvent, clearSession } from "vinxi/http";
|
||||
import { sessionConfig } from "~/server/session-config";
|
||||
|
||||
export async function POST() {
|
||||
"use server";
|
||||
const event = getEvent()!;
|
||||
|
||||
setCookie(event, "userIDToken", "", {
|
||||
path: "/",
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
sameSite: "lax",
|
||||
maxAge: 0,
|
||||
expires: new Date(0)
|
||||
});
|
||||
// Clear Vinxi session
|
||||
await clearSession(event, sessionConfig);
|
||||
|
||||
return new Response(null, {
|
||||
status: 302,
|
||||
|
||||
@@ -1158,8 +1158,7 @@ export default function TestPage() {
|
||||
<div>
|
||||
<h3 class="mb-2 text-lg font-semibold">🔴 Admin Required</h3>
|
||||
<p class="mb-2 text-sm">
|
||||
Maintenance endpoints require admin privileges (userIDToken
|
||||
cookie with ADMIN_ID).
|
||||
Maintenance endpoints require admin privileges.
|
||||
</p>
|
||||
<ul class="ml-6 list-disc space-y-1 text-sm">
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user