* 描述问题
我想在另外一个低代码平台,用nocobase的api做后端服务提供数据处理能力。
在另一平台配置了API之后,调试过程报错:
http://47.121.213.158:13000/api/goods:get?Authorization=Bearer%20eyJhbGcIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsInJvbGVOYW1lIjoiYWRtaW4iLCJpYXQiOjE3A5NDQsImV4cCI6MTcyODUzMjk0NH0.6YbuQtpsENFF5aAFTHx5fVV22UJPye2JDq51A4ve7U4’ from origin ‘http://47.121.213.158:13003’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The value of the ‘Access-Control-Allow-Credentials’ header in the response is ‘’ which must be ‘true’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
需要nocobase服务端开启 CORS 头。
也尝试了在 nocobase的dockers 容器内,修改nginx的配置:(/etc/nginx/sites-enable/nocobase.conf) ,在server中增加了对跨域调用的支持,但是还是不起作用。
能否提供一些配置提示?
* 运行环境
- NocoBase 版本: v1.3.20
- 数据库种类与版本:
- 操作系统:
- 部署方式:
- Docker 镜像版本:
- NodeJS 版本: