When creating a web application using REST API , browsers will have a restriction based on the CORS security. Setting up a proxy application on the same domain as your web application would prevent this problem |
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers. NOTE: The J2ep Proxy is not recommended neither supported for production environments, Instead of, a Centralized configuration parametters can be used, for more detail please check the KA: 000253769 Setting a proxy in tomcat to Remedy RESTAPI
<?xml version="1.0" encoding="UTF-8"?> <config> <server className="net.sf.j2ep.servers.BaseServer" domainName="jettyserver:port" <-- replace this with your ARservername:jettyport isRewriting="true"> <rule className="net.sf.j2ep.rules.DirectoryRule" directory="/rest" /> </server> <server className="net.sf.j2ep.servers.BaseServer" domainName="jakarta.apache.org" isRewriting="true"> <rule className="net.sf.j2ep.rules.AcceptEverythingRule"/> </server> </config>
To test it, go to your browser and type hostname:port/j2ep/rest. You should get something like this: |