Now sendes with Acces-Control-Allow-Origin header.

This commit is contained in:
Kevin Midboe
2017-04-06 18:40:33 +02:00
parent f3ef2ef15a
commit 311bb668fe
4 changed files with 2 additions and 170 deletions

View File

@@ -41,7 +41,8 @@ router.get('/seasoned', function(req, res) {
}
getEpisode(id, function(episode){
res.json({episode}); // this is where you get the return value
res.setHeader('Access-Control-Allow-Origin', 'https://kevinmidboe.com');
res.json({episode}); // this is where you get the return value
});
});
// more routes for our API will happen here