redirect when response type isn't json.
allow all origins.