简体   繁体   中英

WSO2 API Manager - CORS

I'm trying to call an API through WSO2 API Manager but getting CORS error (browser console):

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.

Followed this document from official docs but it doesn't work.

How do I configure CORS correctly in order to call APIs from my application?

Thanks in advance,

Ok, I found how to set allowed origins:

  1. If you uncheck "Allow All Origins" you can set the list of allowed hosts.

It's confuse because input appears only when you uncheck this option. See below:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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