adding some cors to allow silvrtree to get the stuff

This commit is contained in:
Martin Donnelly 2018-01-14 18:56:20 +00:00
parent 88e1543096
commit d79b566be1

View File

@ -21,7 +21,7 @@ app.use(express.static(path.join(__dirname, sitePath)));
app.options('*', cors()); // include before other routes
app.use('/gettrains', cache('60 seconds'), train.getTrainTimes);
app.use('/getnexttraintimes', cache('60 seconds'), train.getNextTrainTimes);
app.use('/getnexttraintimes', cors(), cache('60 seconds'), train.getNextTrainTimes);
app.use('/getroute', cache('60 seconds'), train.getRoute);
app.use('/getnews', cache('30 minutes'), train.getNews);