js--跨域

73 阅读1分钟

Ajax请求如果存在跨域的话,需要:

  1. 后端需要允许进行跨域请求资源
  2. 浏览器中withCredentials 要设置为true