0

I have a browser application that calls WSO2 API Manager JWT Grant endpoint to exchange a JWT for an access token.

The endpoint invoked from Javascript is https://WSO2APIM/oauth2/token

The problem is this call is blocked by the browser because of the CORS restriction:

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)

How can I configure the CORS permission for this endpoint?

.

codependent
  • 23,193
  • 31
  • 166
  • 308

1 Answers1

1

You could enable cors by adding cors hanlder to the token endpoint

org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler

See https://stackoverflow.com/a/35306629/1110305

Chamila Adhikarinayake
  • 3,588
  • 5
  • 25
  • 32