Moved cors allowed origins to conf file.

This commit is contained in:
2020-04-08 23:17:45 +02:00
parent 08433523b7
commit 4d3d8c874c
2 changed files with 19 additions and 18 deletions

View File

@@ -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"
}
}
}

View File

@@ -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());