Cloud Pak for Integration

Cloud Pak for Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to enable CORS header in CP4I?

    Posted Wed April 13, 2022 09:23 AM

    We have a REST API which is developed in IBM App connect toolkit and deployed in IBM Cloud pak for Integration (CP4I) container, whenever we pass CORS header Origin in the request we expect there should be a corresponding CORS header in the response but we are not getting any CORS header (Access-Control-Allow-Origin) in the response, so I need help to enable CORS headers for this API from CP4I. 

    I tried to search for a configuration in CP4I to do the same but I am unable to find. Can someone help to provide with the steps to enable CORS for this API running in CP4I? 



    ------------------------------
    Ramchander Kalyanaraman
    ------------------------------


  • 2.  RE: How to enable CORS header in CP4I?

    Posted Mon April 18, 2022 09:11 AM
    Hi Ramchander,

    Try to add the below configuration in your server.conf.yaml file

    ResourceManagers:
       HTTPConnector:
       CORSEnabled: true
       CORSAllowOrigins: '*'
       CORSAllowMethods: 'GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS'

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------