adding some cors to allow silvrtree to get the stuff
This commit is contained in:
parent
d79b566be1
commit
8b21f42a25
@ -20,10 +20,10 @@ 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('/gettrains', cors(), cache('60 seconds'), train.getTrainTimes);
|
||||
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);
|
||||
app.use('/getroute', cors(), cache('60 seconds'), train.getRoute);
|
||||
app.use('/getnews', cors(), cache('30 minutes'), train.getNews);
|
||||
|
||||
app.listen(port, (err) => {
|
||||
if (err)
|
||||
|
Loading…
Reference in New Issue
Block a user