Jeremy/fixnginx

Tested on both an igg test server and a normal elasticsearch server and things seem to work as expected.