Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { ActionFunctionArgs } from "react-router";
|
||||
import { buildRemindCookie } from "~/services/auth/password-policy-banner.server";
|
||||
import { requireUserId } from "~/utils/session.server";
|
||||
|
||||
// Phase 01 / #27 — resource route powering the "Remind me in 7 days"
|
||||
// button on the password-policy soft-banner. Sets a UX cookie that the
|
||||
// tenant layout consults before rendering the banner. The cookie is NOT a
|
||||
// security control — it is purely a dismissal UX, so SameSite=Lax /
|
||||
// non-httpOnly is fine.
|
||||
export const action = async ({ request }: ActionFunctionArgs) => {
|
||||
await requireUserId(request);
|
||||
return new Response(null, {
|
||||
status: 204,
|
||||
headers: {
|
||||
"Set-Cookie": buildRemindCookie(),
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// Defensive: GET requests should not toggle state. Return 405 so the route
|
||||
// stays POST-only.
|
||||
export const loader = () =>
|
||||
new Response("Method Not Allowed", { status: 405, headers: { Allow: "POST" } });
|
||||
Reference in new issue
Block a user