Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get keys from request headers in express

router.post('/submit', cors(), async (req,res, next) => {
  const apiKey = req.header('x-api-key');
  console.log(apiKey) // THIS GIVES undefined
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #keys #request #headers #express
ADD COMMENT
Topic
Name
8+9 =