Remove trailing slashes from all urls because restify has problems with them
Always return a string when responding on text/html requests and force ajax request to only accept json