mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 12:32:10 +01:00
refactor: fix biome linting issues and update project documentation
- Fix 36+ biome linting issues reducing errors/warnings from 227 to 191 - Replace explicit 'any' types with proper TypeScript interfaces - Fix React hooks dependencies and useCallback patterns - Resolve unused variables and parameter assignment issues - Improve accessibility with proper label associations - Add comprehensive API documentation for admin and security features - Update README.md with accurate PostgreSQL setup and current tech stack - Create complete documentation for audit logging, CSP monitoring, and batch processing - Fix outdated project information and missing developer workflows
This commit is contained in:
@ -68,7 +68,10 @@ export async function csrfProtectionMiddleware(
|
||||
const validation = await CSRFProtection.validateRequest(request);
|
||||
|
||||
if (!validation.valid) {
|
||||
console.warn(`CSRF validation failed for ${method} ${pathname}:`, validation.error);
|
||||
console.warn(
|
||||
`CSRF validation failed for ${method} ${pathname}:`,
|
||||
validation.error
|
||||
);
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
@ -100,11 +103,7 @@ export function generateCSRFTokenResponse(): NextResponse {
|
||||
});
|
||||
|
||||
// Set the CSRF token cookie
|
||||
response.cookies.set(
|
||||
cookie.name,
|
||||
cookie.value,
|
||||
cookie.options
|
||||
);
|
||||
response.cookies.set(cookie.name, cookie.value, cookie.options);
|
||||
|
||||
return response;
|
||||
}
|
||||
@ -121,4 +120,4 @@ export function csrfTokenMiddleware(request: NextRequest): NextResponse | null {
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user