前言
本地网页使用ajax调用jeesite接口报错如下:
Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted。
一、解决方案1(推荐)
找到application.yml文件,取消shiro和跨域注释,代码如下。
注意:空格错误导致跨域配置无效
后端代码
# Shiro 相关配置
shiro:
accessControlAllowOrigin: '*'
accessControlAllowMethods: