release: v0.17.0 (#677)

See CHANGELOG.md, section [0.17.0] — 2026-09-23.
This commit is contained in:
Ralksta
2026-09-23 12:09:08 +02:00
committed by GitHub
parent a3a6319c29
commit 89a8fac564
78 changed files with 9485 additions and 2050 deletions

View File

@@ -9,6 +9,7 @@ import {
MAX_PASSWORD_LENGTH,
} from '@/lib/admin/auth';
import { checkRateLimit, getClientIp, retryAfterSeconds } from '@/lib/rate-limit';
import { isHttpsRequest } from '@/lib/auth';
/** Admin login attempts per minute per IP — the highest-value credential in the app. */
const ADMIN_AUTH_RPM = 5;
@@ -53,7 +54,7 @@ export async function POST(request: NextRequest) {
response.cookies.set(COOKIE_NAME, token, {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
secure: isHttpsRequest(request),
sameSite: 'strict',
path: '/',
maxAge: SESSION_DURATION_MS / 1000,
@@ -73,11 +74,11 @@ export async function GET() {
}
/** DELETE: Logout. */
export async function DELETE() {
export async function DELETE(request: NextRequest) {
const response = NextResponse.json({ success: true });
response.cookies.set(COOKIE_NAME, '', {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
secure: isHttpsRequest(request),
sameSite: 'strict',
path: '/',
maxAge: 0,