Servigistics InService Customization > Customizing System Integrations > Embedding Servigistics InService into Cross-Domain Applications
  
Embedding Servigistics InService into Cross-Domain Applications
A custom filter enables you to embed Servigistics InService into cross-domain applications. By default, you can embed Servigistics InService into same-domain applications only. To use cross-domain applications instead, you must add the custom filter entry to the web.xml file located in the directory <INS_HOME>/InS_SW/SW/Applications/Windchill.ear/codebase.war/WEB-INF.
The custom filter must implement a custom ClickjackFilter method. The method must add the X-Frame-Options response header to tell a browser which content must be displayed in a frame. By default, the X-Frame-Options header value is set to SAMEORIGIN. To display Servigistics InService in a cross-domain application, the custom filter must set the X-Frame-Options header value to ALLOW-FROM <domain_name>, where <domain_name> is the cross-domain application URL. For example, http://thingworx.com.
Consider an example where Servigistics InService is available in the domain https://www.ptc.com/. To access Servigistics InService from another domain such as http://thingworx.com , add a custom filter entry to the web.xml file. The custom filter entry must set the X-Frame-Options header value to ALLOW-FROM http://thingworx.com as shown in the following the sample code:
<filter>
<filter-class>com.ptc.service.delivery.requestcontext.servletfilter.
ClickjackFilter</filter-class>
<init-param>
<param-name>mode</param-name>
<param-value>ALLOW-FROM http://thingworx.com</param-value>
</filter<filter-mapping>
<filter-name>ClickjackFilterForThingWorx</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
The custom filter implements the ClickjackFilterForThingWorx method. A sample ClickjackFilterForThingWorx method is shown in the following code:
The following image shows Servigistics InService embedded into the domain http://thingworx.com with the X-Frame-Options header value set to SAMEORIGIN: