We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406c119 commit f68ddf8Copy full SHA for f68ddf8
server/index.js
@@ -17,7 +17,14 @@ module.exports = function (app) {
17
require
18
);
19
20
- app.use(cors({ origin: 'http://localhost:5000' }));
+ // Use `sofiaUrl` only from env or Ember config (no hardcoded fallbacks).
21
+ // Load Ember config function with the current environment if provided.
22
+ const config = require('../config/environment')(
23
+ process.env.EMBER_ENV || process.env.NODE_ENV
24
+ );
25
+ const sofiaUrl = process.env.SOFIA_URL || config.sofiaUrl;
26
+
27
+ app.use(cors({ origin: sofiaUrl }));
28
29
// Log proxy requests
30
const morgan = require('morgan');
0 commit comments