Sign-out answered GET behind a <Link>, and Next prefetches links that are in the viewport. The button sits in every page header, so the browser called it as soon as a page rendered and cleared the session cookie before the reader had clicked anything. The first page loaded; the next navigation landed back on the password screen, which read as the session not persisting. It is a POST form now, and the route answers POST only — a prefetch of it gets 405 and changes nothing. The rule this broke is the general one: an endpoint with a side effect must be unreachable by a prefetch, a crawler, or a browser preloading what it thinks you will click. Both session cookies are now set on the returned response rather than through the cookies() store, which a freshly constructed redirect does not reliably carry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
5 lines
389 B
Bash
5 lines
389 B
Bash
MONGODB_URI mongodb+srv://boklukunefe:9rprDcfHTjBYza7z@cluster0.1aarkvo.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
|
|
MONGODB_DATABASE fatihsmg4
|
|
INGEST_TOKEN 066da6fc58a0fcd8a35deccb29e43ef7a0b3bcda5a3c2b99db86e64a5b982ec6
|
|
SESSION_SECRET a89b011dfe7bec22c4f44f89e8e0ef647e6ff3289e84ca1b5b68c413ff7f4b77
|
|
DASHBOARD_PASSWORD <sen belirle, en az 8 karakter> |