Enable CORS in the Oracle Service bus
Enabling CORS(Cross Origin Resource Sharing) is one of the primary requirement when we are playing with multiple environments and want to access service from the different environment.
Considering, we have a OSB service that is deployed in one environment(Oracle Cloud) and want to access this service outside from the Oracle cloud environment, let’s say share point environment.
To achieve this, We have to send the Access-Control-Allow-Origin header in the service response.
Drop the Transport Header Component from the component pallet in the response Pipeline with the below property:
Hi Ankur. According with Doc ID 2210010.1, Oracle Service Bus does not support CORS.
Are you able to successfully call this from any clinet?
Yes Hari. We have consumed the OSB service in Sharepoint.
Thank you for the post.
I have requirement, where I have to pass CROSS ORIGIN to call the AJAX page. I have used transport header and set "Access-Control-Allow-Origin" = '*' . While testing from POSTMAN plugin, i can see all the values passed in transport header but when we test from application, it is giving below error :
" No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://10.3.4.15' is therefore not allowed access. The response had HTTP status code 404."
OSB version: 220.127.116.11
Using transport header in response pipeline.
Direction: Inbound response
Any help/suggestion is highly appreciated.
yes. we spoke to Oracle and they are saying the OSB does not support CORS. How did you get it to work?
Thanks dude it worked after soo much research !!!!
Can u tell me how u did it?
The 'Access-Control-Allow-Origin' header is not in the list that is in the "name" field. What I did is to flag the "Copy all" because I found that the 'Access-Control-Allow-Origin' header is in the response but not being sent to the clien
You just need to add it in your response pipeline thats it. They same way in the screenshot
How this can be work ??
Just work with GET verb! OSB don't have options verb!