fixed ajax for non-localhost clients