Added the use of tokenToUser so that it is verified that a valid token is in the request header when doing actions that need login verification.

This commit is contained in:
2017-09-27 16:27:05 +02:00
parent a3de70e2da
commit bab4af08d9

View File

@@ -11,6 +11,9 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
/* Decode the Authorization header if provided */
app.use(tokenToUser);
var port = 31459; // set our port
var router = express.Router();
var allowedOrigins = ['https://kevinmidboe.com', 'http://localhost:8080']