繁体   English   中英

WSO2 API 管理器 - CORS

[英]WSO2 API Manager - CORS

我正在尝试通过 WSO2 API 管理器调用 API,但收到 CORS 错误(浏览器控制台):

Access to XMLHttpRequest at 'https://localhost:8243/blk/mantem-instituicoes/' from origin 'http://localhost:4200' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

按照官方文档中的此文档进行操作,但它不起作用。

如何正确配置 CORS 以便从我的应用程序调用 API?

提前致谢,

好的,我找到了如何设置允许的来源:

  1. 如果取消选中“允许所有来源”,则可以设置允许的主机列表。

这很混乱,因为只有当您取消选中此选项时才会出现输入。 见下文:

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM