mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-09 18:06:45 +08:00
Use a lightweight cookie (multica_logged_in) + Next.js 16 proxy to 302-redirect authenticated users visiting / straight to /issues. Unauthenticated visitors (and search engine crawlers) continue to see the full landing page with zero flash. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
10 lines
263 B
TypeScript
10 lines
263 B
TypeScript
const COOKIE_NAME = "multica_logged_in";
|
|
|
|
export function setLoggedInCookie() {
|
|
document.cookie = `${COOKIE_NAME}=1; path=/; max-age=31536000; samesite=lax`;
|
|
}
|
|
|
|
export function clearLoggedInCookie() {
|
|
document.cookie = `${COOKIE_NAME}=; path=/; max-age=0`;
|
|
}
|