aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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)