e138752dd3
Add trust proxy, WebAuthn challenge TTL, stricter public collaboration rate limits, generic 500 responses, Docker POSTGRES_PASSWORD from env, nginx security headers/CSP, and deployment documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
10 lines
363 B
TypeScript
10 lines
363 B
TypeScript
import type { Response } from 'express'
|
|
|
|
const PUBLIC_ERROR = 'Internal server error'
|
|
|
|
/** Log full error server-side; never expose stack or Prisma internals to clients. */
|
|
export function sendInternalError(res: Response, error: unknown, context: string): Response {
|
|
console.error(`[${context}]`, error)
|
|
return res.status(500).json({ error: PUBLIC_ERROR })
|
|
}
|