'sailsjs returns http code 426 when using a host name

While using SailsJS locally (using localhost everything works fine) but if I switch to a hostname (127.0.0.1 defined in the hosts file). I get http code 426.

Here is the error that I get: Http 426

Not sure how the usage of websockets are relevant to the host name.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source