diff --git a/seasoned_api/conf/development.json.example b/seasoned_api/conf/development.json.example index cb421e7..5523655 100644 --- a/seasoned_api/conf/development.json.example +++ b/seasoned_api/conf/development.json.example @@ -1,25 +1,26 @@ { - "database": { - "host": "../shows.db" - }, - "webserver": { - "port": 31459 - }, - "tmdb": { - "apiKey": "" - }, - "plex": { - "ip": "" - }, + "database": { + "host": "../shows.db" + }, + "webserver": { + "port": 31459, + "origins": [] + }, + "tmdb": { + "apiKey": "" + }, + "plex": { + "ip": "" + }, "tautulli": { "apiKey": "", "ip": "", "port": "" }, - "raven": { - "DSN": "" - }, - "authentication": { + "raven": { + "DSN": "" + }, + "authentication": { "secret": "secret" - } + } } diff --git a/seasoned_api/src/webserver/app.js b/seasoned_api/src/webserver/app.js index 2eee898..fc6be9c 100644 --- a/seasoned_api/src/webserver/app.js +++ b/seasoned_api/src/webserver/app.js @@ -20,7 +20,7 @@ app.use(Raven.requestHandler()); app.use(bodyParser.json()); const router = express.Router(); -const allowedOrigins = ['https://kevinmidboe.com', 'http://localhost:8080']; +const allowedOrigins = configuration.get('webserver', 'origins'); // TODO: All JSON handling in a single router // router.use(bodyParser.json());