Answers for "set headers in express"

4

set headers in express

response.header("Access-Control-Allow-Origin", "*");
    response.header("Access-Control-Allow-Headers", "Origin, X-Requested-With,Content-Type, Accept");
    response.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE')
Posted by: Guest on August-27-2020
0

hwo to cehck req header in js

var host = req.headers['host'];
Posted by: Guest on June-12-2020
0

http header express

app.get('/', (req, res) => {
  req.header('User-Agent')
})
// Use the Request.header() method to access
//one individual request header’s value
Posted by: Guest on April-17-2020
-2

in express how do you set the location header

res.location('/customers/' + inst._id)1
Posted by: Guest on March-13-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language