mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 11:32:13 +01:00
feat: implement cache layer, CSP improvements, and database performance optimizations
- Add Redis cache implementation with LRU eviction - Enhance Content Security Policy with nonce generation - Optimize database queries with connection pooling - Add cache invalidation API endpoints - Improve security monitoring performance
This commit is contained in:
@ -12,8 +12,10 @@ import {
|
||||
|
||||
// GET /api/platform/companies - List all companies
|
||||
export async function GET(request: NextRequest) {
|
||||
let session: any = null;
|
||||
|
||||
try {
|
||||
const session = await getServerSession(platformAuthOptions);
|
||||
session = await getServerSession(platformAuthOptions);
|
||||
const ip = extractClientIP(request);
|
||||
const userAgent = request.headers.get("user-agent") || undefined;
|
||||
|
||||
@ -137,8 +139,10 @@ export async function GET(request: NextRequest) {
|
||||
|
||||
// POST /api/platform/companies - Create new company
|
||||
export async function POST(request: NextRequest) {
|
||||
let session: any = null;
|
||||
|
||||
try {
|
||||
const session = await getServerSession(platformAuthOptions);
|
||||
session = await getServerSession(platformAuthOptions);
|
||||
const ip = extractClientIP(request);
|
||||
const userAgent = request.headers.get("user-agent") || undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user