Use middleware and support JSONP.