I am calling a Azure API app from JavaScript. I need to send a parameter to backend via API based on the domain that application executes under (mydonain.org parameter1, for mydomain.com parameter2). However I need to hide this parameter from the users (when users right click and view JavaScript code, they will not be able to see the parameter).
How can I send this parameters from JavaScript to backend via API app and make in invisible for users?
$.getJSON("api/searchItems/" + myparam,
function (Data) {
...
});
myParam has different values based on where the application executes. if it executes on mydomain.com it is 1 and if it executes on mydomain.org it is 2 etc. but this code is not approved because you can find out what the parameter is and call the api directly.