JS: recognize Express headers as RequestInputAccess

This commit is contained in:
Asger F
2018-09-21 18:37:03 +01:00
parent 7f56be6fe2
commit ce11b5330d
3 changed files with 20 additions and 0 deletions

View File

@@ -42,3 +42,9 @@ function getArrowHandler() {
return (req, res) => f();
}
app.use(getArrowHandler());
app.post('/headers', function(req, res) {
req.headers.baz;
req.host;
req.hostname;
});