Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(infra): allow https://localhost dev origins in S3 CORS (#7639)

teo520c00a6a017
diff --git a/infra/packages/resources/src/resources/cors.ts b/infra/packages/resources/src/resources/cors.ts
index f7c1222276..fe3fd63e97 100644
--- a/infra/packages/resources/src/resources/cors.ts
+++ b/infra/packages/resources/src/resources/cors.ts
@@ -9,6 +9,16 @@ export const ALLOWED_ORIGINS = [
'http://localhost:3007',
'http://localhost:3008',
'http://localhost:3009',
+ 'https://localhost:3000',
+ 'https://localhost:3001',
+ 'https://localhost:3002',
+ 'https://localhost:3003',
+ 'https://localhost:3004',
+ 'https://localhost:3005',
+ 'https://localhost:3006',
+ 'https://localhost:3007',
+ 'https://localhost:3008',
+ 'https://localhost:3009',
'http://host.local:3000',
'https://app-dev.macro.com',
'https://app-staging.macro.com',
diff --git a/infra/stacks/bulk-upload/upload-bucket.test.ts b/infra/stacks/bulk-upload/upload-bucket.test.ts
index d668ad93c0..7e48abdf34 100644
--- a/infra/stacks/bulk-upload/upload-bucket.test.ts
+++ b/infra/stacks/bulk-upload/upload-bucket.test.ts
@@ -78,6 +78,7 @@ describe('Slack import staging protections', () => {
]);
expect(rule.allowedOrigins).toContain('https://macro.com');
expect(rule.allowedOrigins).toContain('http://localhost:3000');
+ expect(rule.allowedOrigins).toContain('https://localhost:3000');
expect(rule.allowedOrigins).not.toContain('*');
expect(rule.exposeHeaders).toContain('ETag');
});