跨域问题
报错信息为:Failed to load http://192.168.30.119: Request header field language is not allowed by Access-Control-Allow-Headers in preflight response.
原因:前台发送的请求体包含了没有允许的Header
如何解决问题:在请求体加入允许的Header类型
原有代码: response.setHeader(“Access-Control-Allow-Headers”, “x-requested-with,Authorization”);
修改后: response.setHeader(“Access-Control-Allow-Headers”, "x-requested-with,Authorization,language");