I am having this problem with the Integration Server where I am trying to call a REST service using Javascript from Mywebmethods OpenCAF Application where I am faced with the Same Origin Policy problem and i cant get the request to work.
Keep in mind that i added the Cross Origin Resource Sharing (CORS) headers in the server side service and still not working
I have the same problem. I try to call a service with javascript. Because the website is on port 8585 and the service is on port 5555, the browser says:
XMLHttpRequest cannot load http://localhost:5555/rest/votingMachine/restServices/saveData?json=⌠Response to preflight request doesnât pass access control check: No âAccess-Control-Allow-Originâ header is present on the requested resource. Origin âhttp://localhost:8585â is therefore not allowed access. The response had HTTP status code 403.
I tried to add
watt.server.cors.enabled=true
watt.server.cors.allowedOrigins=http://localhost:8585
llike mentioned in previous posts, but it is still not working. Is there anything else, I have to configure first?
Glad to note that it worked. But notice that âwatt.server.cors.allowedOriginsâ is â*â in the settings I provided, which means any origin can try to access your resources. Change it to have comma separated list of sources which are only allowed to access the resources on your IS.
Hi Prasad, would like to know your input on how to send a custom header when a client sends you a OPTIONS request. Basically, the ask is that they will send a custom header with a specific value with OPTIONS to the resource, we should confirm that we received that custom header value they sent with a second custom header value from this side.
eg: customer header: wh-request-origin: thisistest
we should send them with: wh-allowed-origin: thisistest
I posted this same request at some other place with no luck.