Answer the question
In order to leave comments, you need to log in
How to remove post resubmission to node.js server?
.post((req, res) => {
var data = req.body;
news.create(data, function(err, news){
if(err) throw(err);
res.render('created-news', news);
});
})
Answer the question
In order to leave comments, you need to log in
req.headers contains all the request headers parsed into an object, where the key is the header itself reduced to lower case, and the value is its value.
That is, in your case, you can check req.headers.referer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question