- 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>
16 lines
443 B
TypeScript
16 lines
443 B
TypeScript
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import './index.css'
|
|
import App from './App.tsx'
|
|
|
|
// Catch unhandled async errors globally (e.g. forgotten .catch() in event handlers)
|
|
window.addEventListener('unhandledrejection', (event) => {
|
|
console.error('[Unhandled Promise Rejection]', event.reason);
|
|
});
|
|
|
|
createRoot(document.getElementById('root')!).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
)
|