diff --git a/backend/package.json b/backend/package.json index d1e3affd..b602b2a0 100644 --- a/backend/package.json +++ b/backend/package.json @@ -22,7 +22,6 @@ "@aws-sdk/client-pricing": "^3.142.0", "aws-sdk": "^2.1189.0", "body-parser": "^1.20.0", - "cors": "^2.8.5", "dotenv": "^16.0.1", "express": "^4.18.1", "js-yaml": "^4.1.0", @@ -35,7 +34,6 @@ "validator": "^13.7.0" }, "devDependencies": { - "@types/cors": "^2.8.12", "@types/express": "^4.17.13", "@types/js-yaml": "^4.0.5", "@types/multer": "^1.4.7", diff --git a/backend/src/index.ts b/backend/src/index.ts index 1509c01a..034e4774 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -1,6 +1,5 @@ import express, { Express, Request, Response } from "express"; import dotenv from "dotenv"; -import cors from "cors"; import bodyParser from "body-parser"; import { logRequestBatchHandler, @@ -22,12 +21,6 @@ dotenv.config(); const app: Express = express(); const port = process.env.PORT || 8080; -app.use( - cors({ - origin: "http://localhost:3000", - }) -); - app.use(bodyParser.json()); app.get("/api/v1", (req: Request, res: Response) => { diff --git a/backend/yarn.lock b/backend/yarn.lock index c59ecf7b..19b78390 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -771,11 +771,6 @@ dependencies: "@types/node" "*" -"@types/cors@^2.8.12": - version "2.8.12" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" - integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== - "@types/express-serve-static-core@^4.17.18": version "4.17.30" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz#0f2f99617fa8f9696170c46152ccf7500b34ac04" @@ -1144,14 +1139,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cors@^2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -1858,7 +1845,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -2447,7 +2434,7 @@ validator@^13.7.0: resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== -vary@^1, vary@~1.1.2: +vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== diff --git a/frontend/src/constants.ts b/frontend/src/constants.ts index fe90bc16..e6df920f 100644 --- a/frontend/src/constants.ts +++ b/frontend/src/constants.ts @@ -11,4 +11,4 @@ export const RISK_TO_COLOR = { [RiskScore.HIGH]: "red", }; -export const API_URL = "http://localhost:8080/api/v1"; +export const API_URL = "http://localhost:3000/api/v1";