Client features #22

Merged
KevinMidboe merged 12 commits from client_features into master 2017-09-07 21:56:03 +00:00
Showing only changes of commit 28d0b63960 - Show all commits

View File

@@ -15,7 +15,8 @@ var allowedOrigins = ['https://kevinmidboe.com', 'http://localhost:8080']
router.use(function(req, res, next) {
console.log('Something is happening.');
// TODO add logging of all incoming
console.log('Request: ', req.originalUrl);
var origin = req.headers.origin;
if (allowedOrigins.indexOf(origin) > -1) {
res.setHeader('Access-Control-Allow-Origin', origin);