前端js请求携带函数名称,后端服务响应内容作为函数参数响应返回
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader(“Access-Control-Allow-Headers”, “*”);
response.setHeader(“Access-Control-Allow-Methods”, “POST, GET, OPTIONS, DELETE”);
location / { add_header Access-Control-Allow-Origin http://www.domain1.com; #当前端只跨域不带cookie时,可为* }