From e5ebe55cf91a0f8121953c6462f5b5547950cf8f Mon Sep 17 00:00:00 2001 From: nickviola Date: Thu, 29 Feb 2024 11:32:08 -0600 Subject: [PATCH] Add wildcard to CORS origin to fix access issues --- backend/src/api/app.ts | 2 +- frontend/scripts/constants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/api/app.ts b/backend/src/api/app.ts index 3d17c4c68..040f74109 100644 --- a/backend/src/api/app.ts +++ b/backend/src/api/app.ts @@ -61,7 +61,7 @@ app.use(express.json({ strict: false })); app.use( cors({ - origin: [/.*crossfeed\.cyber\.dhs\.gov$/, /localhost$/], + origin: ['*'], methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'] }) ); diff --git a/frontend/scripts/constants.js b/frontend/scripts/constants.js index 7579df589..cd95e7b9f 100644 --- a/frontend/scripts/constants.js +++ b/frontend/scripts/constants.js @@ -1,3 +1,3 @@ //CORS Options -export const ALLOW_ORIGIN = [/.*crossfeed\.cyber\.dhs\.gov$/, /localhost$/]; +export const ALLOW_ORIGIN = ['*']; export const ALLOW_METHODS = ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'];