WSO2 API管理器-CORS

WSO2 API管理器-CORS,wso2,wso2-am,Wso2,Wso2 Am,我试图通过WSO2 API管理器调用API,但收到CORS错误(浏览器控制台): 在官方文件中遵循了这一点,但它不起作用 如何正确配置CORS,以便从应用程序调用API 提前感谢,好的,我找到了如何设置允许的来源: 如果取消选中“允许所有来源”,则可以设置允许的主机列表 这很混乱,因为只有在取消选中此选项时才会显示输入。见下文: Access to XMLHttpRequest at 'https://localhost:8243/blk/mantem-instituicoes/' from

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

在官方文件中遵循了这一点,但它不起作用

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


提前感谢,

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

  • 如果取消选中“允许所有来源”,则可以设置允许的主机列表
  • 这很混乱,因为只有在取消选中此选项时才会显示输入。见下文:

    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.