From 32b9e308e34d0f57f3a6adc144667de975404917 Mon Sep 17 00:00:00 2001 From: Madison Hicks Date: Tue, 7 Jan 2020 15:05:18 -0600 Subject: [PATCH] Note that status not respected by res.redirect() Like the title says, `res.redirect()` doesn't respect the status code set by `res.status()`. There's language to this effect on the `res.redirect()` page, but it should probably be here, too. --- reference/res/res.status.md | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/res/res.status.md b/reference/res/res.status.md index 9d1a8badf..bf2bd6e01 100644 --- a/reference/res/res.status.md +++ b/reference/res/res.status.md @@ -16,6 +16,7 @@ res.send('I am a teapot'); ### Notes >+ The status code may be set up until the response is sent. >+ `res.status()` is effectively just a chainable alias of Node's `res.statusCode = …;`. +>+ As of Sails v1.x, for HTTP requests, `res.redirect()` [does not respect the status code established by `res.status()`](https://github.com/balderdashy/sails-docs/pull/796#issuecomment-284224746).