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 host name (defined in the hosts file and mapped to 127.0.0.1) I get http code 426.

Http 426

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