added cfg(ajaxConfig) to enable CORS