CORS跨域问题:No 'Access-Control-Allow-Origin' header is present on the requested resource.

问题描述

服务器成功返回,但是报异常


问题分析

报错信息中存在CORS关键字,考虑为跨域问题

解决方式

在返回的响应头中加入以下信息

Access-Control-Allow-Origin: http://192.168.1.102
Access-Control-Allow-Credentials: true
Content-Type: text/html; charset=utf-8
posted @ 2020-07-01 16:24  孤城牧笛  阅读(234)  评论(0)    收藏  举报