我正在尝试在WSO2am-1.7.0中订阅已发布的API,但它没有给出任何响应。我已经发布了一个类型为GET的宁静客户端。我通过传递值在WSO2AM的API控制台中对此进行测试。结果应该显示我在浏览器中访问restful client url时得到的JSON输出。即使我尝试了“查找推文”示例,也不行。
答案 0 :(得分:0)
用户必须在api-manager.xml
中启用CORS配置才能尝试swagger客户端。查看here了解更多信息
例如:
<CORSConfiguration>
<!-Configuration to enable/disable sending CORS headers from the Gateway->
<Enabled>true</Enabled>
<!--The value of the Access-Control-Allow-Origin header. Default values are
API Store addresses, which is needed for swagger to function.-->
<Access-Control-Allow-Origin>http://10.100.1.35:9763, https://10.100.1.35:9443</Access-Control-Allow-Origin>
<!-Configure Access-Control-Allow-Headers->
<Access-Control-Allow-Headers>authorization,Access-Control-Allow-Origin,Content-Type</Access-Control-Allow-Headers>
</CORSConfiguration>