If you are running internally using WAS Liberty then you can add the following to the Liberty server.xml to accept the CORS calls.
<cors domain="/DecisionService"
allowedOrigins="http://localhost:9090"
allowedMethods="GET, DELETE, POST"
allowedHeaders="accept, Request, content-type"
exposeHeaders="Request"
allowCredentials="true"
maxAge="3600" />
Alternatively if you launch the browser app using the Rule Designer's Internal Browser (Eclipse Preferences > General > Web Browser) then I find this sometimes avoids the CORS issue.
------------------------------
Andy Macdonald
------------------------------
Original Message:
Sent: Sun December 17, 2023 11:25 PM
From: Kian Seng Goh
Subject: CORS questions when running Eclipse ODM locally
Hi does anyone tried to intercept incoming API request and add in CORS header?
We like to have below header in the response.
Because we are doing some internal testing which require browser to API call ODM directly.
------------------------------
Kian Seng Goh
------------------------------