mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 15:32:10 +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:
@ -1,12 +1,11 @@
|
||||
#!/usr/bin/env tsx
|
||||
|
||||
import {
|
||||
buildCSP,
|
||||
validateCSP,
|
||||
testCSPImplementation,
|
||||
generateNonce,
|
||||
detectCSPBypass,
|
||||
} from "../lib/csp";
|
||||
import { buildCSP, generateNonce } from "../lib/csp-server";
|
||||
|
||||
interface CSPValidationResult {
|
||||
configuration: string;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env tsx
|
||||
|
||||
import { buildCSP, validateCSP, generateNonce } from "../lib/csp";
|
||||
import { validateCSP } from "../lib/csp";
|
||||
import { buildCSP, generateNonce } from "../lib/csp-server";
|
||||
|
||||
interface TestCase {
|
||||
name: string;
|
||||
@ -15,7 +16,7 @@ const testCases: TestCase[] = [
|
||||
name: "Development CSP",
|
||||
config: { isDevelopment: true },
|
||||
shouldPass: true,
|
||||
expectedWarnings: 2, // unsafe-eval and unsafe-inline warnings
|
||||
expectedWarnings: 3, // unsafe-eval, unsafe-inline, and missing reporting warnings
|
||||
},
|
||||
{
|
||||
name: "Production CSP with nonce",
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
#!/usr/bin/env tsx
|
||||
|
||||
import {
|
||||
buildCSP,
|
||||
validateCSP,
|
||||
generateNonce,
|
||||
detectCSPBypass,
|
||||
testCSPImplementation,
|
||||
} from "../lib/csp";
|
||||
import { buildCSP, generateNonce } from "../lib/csp-server";
|
||||
|
||||
interface CSPTestResult {
|
||||
test: string;
|
||||
|
||||
Reference in New Issue
Block a user