From 542084cae3d359581f488420c51dced860353f82 Mon Sep 17 00:00:00 2001 From: Nick Coutsos Date: Sat, 21 May 2022 21:51:45 -0400 Subject: Fix origin --- api/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/index.js b/api/index.js index e923c3c..b7bd79f 100644 --- a/api/index.js +++ b/api/index.js @@ -9,8 +9,10 @@ const keyboards = require('./routes/keyboards') const app = express() +const { origin } = new URL(config.APP_BASE_URL) + app.use(bodyParser.json()) -app.use(cors({ origin: config.APP_BASE_URL })) +app.use(cors({ origin })) if (config.ENABLE_DEV_SERVER) { applicationInit(app) -- cgit v1.2.3