簡體   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