【发布时间】:2017-07-29 15:56:16
【问题描述】:
我在 WSO2 ESB 5.0.0 上创建了一个带有任何端点的 Rest API。
我的端点调用在 java 上创建的 api rest(在 Tomcat 8 上运行),如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="RecuperarArmadilhaPorId">
<http statistics="enable"
method="GET"
uri-template="http://localhost:8080/impactorcamentosgpmpu/ns/rest/pga/armadilhas/detalhePorId/{uri.var.id}"/>
</endpoint>
我没有使用 Identity Server,而且我现在不想使用。
当我调用我的网址 wso2 (http://192.168.10.178:8280/mapaHomologacao/ns/rest/pga/localidadesPorRota/101) 内部移动应用程序时,我收到了 cors 错误:
XMLHttpRequest cannot load
http://192.168.10.178:8280/mapaHomologacaorotas/completa/1/101. No 'Access-
Control-Allow-Origin' header is present on the requested resource. Origin
'http://localhost:8100' is therefore not allowed access.
我尝试在 repository/conf/tomcat/carbon/WEB-INF,我按照这个 url WSO2 API Manager CORS
但没有任何改变。
我该如何解决这个问题?
问候,
亚历山德罗
【问题讨论】: