CognxSafeTrack commited on
Commit
44df82e
Β·
1 Parent(s): 5e43a38

fix: update CORS policy to allow all origins for easier debugging

Browse files
Files changed (1) hide show
  1. apps/api/src/index.ts +5 -1
apps/api/src/index.ts CHANGED
@@ -69,7 +69,11 @@ const server = Fastify({
69
  });
70
 
71
  // ── CORS ───────────────────────────────────────────────────────────────────────
72
- server.register(cors);
 
 
 
 
73
 
74
  // ── JWT ────────────────────────────────────────────────────────────────────────
75
  server.register(fastifyJwt, {
 
69
  });
70
 
71
  // ── CORS ───────────────────────────────────────────────────────────────────────
72
+ server.register(cors, {
73
+ origin: true, // Allow all origins
74
+ methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
75
+ allowedHeaders: ['Content-Type', 'Authorization', 'x-organization-id']
76
+ });
77
 
78
  // ── JWT ────────────────────────────────────────────────────────────────────────
79
  server.register(fastifyJwt, {