We are working with the WHD API to integrate with some other processes via a web-based form.
Calling the api leads to CORS errors. I have found a way around this by changing the web.xml file here....
Program Files\WebHelpDesk\bin\webapps\helpdesk\WEB-INF
...and adding this (testing):
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value> </init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Content-Type</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Is there a better way to allow calling the api from a web form? Thanks.
Steve