1. CORS is allowed on Guardium appliance for REST API requests especially to support such client.
2. I wrote a pure javascript client a few years ago, can't find the code - I do remember it was not simple, it required two phase requests with first one being an OPTIONS request and after that the actual GET/POST API request.
I think javascript frameworks such as jquery and others can make it easier.
Good luck
------------------------------
GUY GALIL
------------------------------
Original Message:
Sent: Thu May 21, 2020 04:01 AM
From: Ron Shleif
Subject: Creating a web interface for Guardium's REST API
I've have been trying to make a simple web interface using JS to send POST and GET requests to the REST API of a local Guardium appliance, but I have encountered a problem with the CORS policy not allowing any of the requests. Using postman I have been able to use the API just fine but I can't get around the CORS policy in the browser. I have seen many Guardium API website POC even from IBM but couldn't find any code examples or guide. To summarize the question, is there a way to get around the CORS policy using JS or is there a different method I could take to create a simple web interface for sending GET and POST request to the appliance?
------------------------------
Ron Shleif
------------------------------