为 WSO2 配置 CORS API Manager JWT Grant 令牌端点
Configuring CORS for WSO2 API Manager JWT Grant token endpoint
我有一个浏览器应用程序调用 WSO2 API 管理器 JWT Grant 端点来交换 JWT 以获取访问令牌。
从 Javascript 调用的端点是 https://WSO2APIM/oauth2/token
问题是由于 CORS 限制,此调用被浏览器阻止:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading
the remote resource at https://WSO2APIM/oauth2/token/. (Reason: CORS
header ‘Access-Control-Allow-Origin’ missing)
如何为此端点配置 CORS 权限?
.
您可以通过将 cors 处理程序添加到令牌端点来启用 cors
org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler
见
我有一个浏览器应用程序调用 WSO2 API 管理器 JWT Grant 端点来交换 JWT 以获取访问令牌。
从 Javascript 调用的端点是 https://WSO2APIM/oauth2/token
问题是由于 CORS 限制,此调用被浏览器阻止:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://WSO2APIM/oauth2/token/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
如何为此端点配置 CORS 权限?
.
您可以通过将 cors 处理程序添加到令牌端点来启用 cors
org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler
见