Moved cors allowed origins to conf file.
This commit is contained in:
@@ -1,25 +1,26 @@
|
|||||||
{
|
{
|
||||||
"database": {
|
"database": {
|
||||||
"host": "../shows.db"
|
"host": "../shows.db"
|
||||||
},
|
},
|
||||||
"webserver": {
|
"webserver": {
|
||||||
"port": 31459
|
"port": 31459,
|
||||||
},
|
"origins": []
|
||||||
"tmdb": {
|
},
|
||||||
"apiKey": ""
|
"tmdb": {
|
||||||
},
|
"apiKey": ""
|
||||||
"plex": {
|
},
|
||||||
"ip": ""
|
"plex": {
|
||||||
},
|
"ip": ""
|
||||||
|
},
|
||||||
"tautulli": {
|
"tautulli": {
|
||||||
"apiKey": "",
|
"apiKey": "",
|
||||||
"ip": "",
|
"ip": "",
|
||||||
"port": ""
|
"port": ""
|
||||||
},
|
},
|
||||||
"raven": {
|
"raven": {
|
||||||
"DSN": ""
|
"DSN": ""
|
||||||
},
|
},
|
||||||
"authentication": {
|
"authentication": {
|
||||||
"secret": "secret"
|
"secret": "secret"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ app.use(Raven.requestHandler());
|
|||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
|
|
||||||
const router = express.Router();
|
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
|
// TODO: All JSON handling in a single router
|
||||||
// router.use(bodyParser.json());
|
// router.use(bodyParser.json());
|
||||||
|
|||||||
Reference in New Issue
Block a user