Supose that you have a Windows Azure Websites Node.js Applcation, and you're like all those cool kids out there sending custom HTTP codes and suddenly from your client application you notice
The custom error module does not recognize this error.
And you start to freak out, but you don't need to, because here's how to solve it. As David Ebbo pointed out on his reply to my desperate email, this was already answered on IIS Node's GitHub Issues. However the solution wasn't copy and paste (but almost).
What to do?
If you don't have a web.config go to your website FTP's and download a copy from ftp://whatever/site/wwwroot/web.config
Store it on your project root directory
Add the following directives (IMPORTANT: keep the casing as is)
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpErrors existingResponse="PassThrough" /> <!-- whatever comes built-in --> </system.webServer> </configuration>
- Commit & Push
This solves the issue on Windows Azure Websites and works like charm, so you're now free to use every HTTP Status code like all the other cool kids do.