Files
foxhunt/web-dashboard/src/main.tsx
jgrusewski 71d988e5f1 safety(web-gateway,web-dashboard): security headers, server-side validation, prod build hardening
- 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>
2026-02-22 09:27:29 +01:00

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>,
)