Skip to content

Commit

Permalink
Use newer res.status().send() methods.
Browse files Browse the repository at this point in the history
This fixes the following express deprecation warning: 
`express deprecated res.send(status, body)`
  • Loading branch information
psirenny committed May 28, 2015
1 parent e039309 commit 5a9c618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -19,6 +19,6 @@ var redirectUrl = function (req, res) {
if (req.method === "GET") {
res.redirect(301, "https://" + req.headers.host + req.originalUrl);
} else {
res.send(403, "Please use HTTPS when submitting data to this server.");
res.status(403).send("Please use HTTPS when submitting data to this server.");
}
};

0 comments on commit 5a9c618

Please sign in to comment.