aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNick Coutsos <[email protected]>2022-05-21 21:51:45 -0400
committerNick Coutsos <[email protected]>2022-05-21 21:51:45 -0400
commit542084cae3d359581f488420c51dced860353f82 (patch)
tree9798438f4852e98924fe51b0a18777971e06969b
parentfa395e300945be326b622ac09ac77c3bae53ae26 (diff)
downloadkeymap-editor-542084cae3d359581f488420c51dced860353f82.tar.gz
keymap-editor-542084cae3d359581f488420c51dced860353f82.zip
Fix origin
-rw-r--r--api/index.js4
1 files changed, 3 insertions, 1 deletions
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)