How to set the location response HTTP header in Express framework? How to set the location response HTTP header in Express framework? express express

How to set the location response HTTP header in Express framework?


you're setting res.location. res.location is a function.

res.location('/customers/' + inst._id)


The res object exposes setHeader():

res.setHeader('Location', foo);

Try that instead of res.location.