- Add HTTP security headers to all responses: X-Frame-Options: DENY, X-Content-Type-Options: nosniff, X-XSS-Protection: 0, Referrer-Policy: strict-origin-when-cross-origin, Strict-Transport-Security: max-age=31536000 - Add server-side input validation to submit_order: symbol format, side/order_type enum range, quantity range, price positivity, limit orders require price — 12 new tests - Disable sourcemaps in production builds (vite.config.ts) - Add global unhandled promise rejection handler (main.tsx) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
631 B
TypeScript
28 lines
631 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: process.env.NODE_ENV !== 'production',
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['react', 'react-dom', 'react-router-dom'],
|
|
charts: ['lightweight-charts', 'recharts'],
|
|
query: ['@tanstack/react-query'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|