Fix AJAX to be used for same host requests only