Add support for passing arguments to callback function and CORS.