com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Enabling CORS for Data Services

You can enable Cross Origin Resource Sharing for data services deployed in WSO2 DSS. As explained below, you have the option of enabling CORS for selected data services or for all the data services. 

To enable CORS in DSS:

  1. Download the following JARs: "cors-filter-2.4.jar" and "java-property-utils-1.9.1.jar".
  2. Copy the JARs to the <DSS_HOME>/repository/components/lib/ directory.
  3. Add the following configurations to the <DSS_HOME>/repository/conf/tomcat/web.xml file. 

    <filter>	
    	<filter-name>CORS</filter-name>
    	<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>	
    </filter>
    <filter-mapping>
    	<filter-name>CORS</filter-name>
    	<url-pattern>/*</url-pattern>
    </filter-mapping>
  4. Edit the <filter-mapping> section in the above configuration to specify whether CORS should be enabled for all data services or only selected data services.

    • To enable CORS for a selected data service, add the service's url as the url pattern:

      <filter-mapping>
      	<filter-name>CORS</filter-name>
      	<url-pattern>/services/example/*</url-pattern>
      </filter-mapping>
    • To enable CORS for multiple data service, you add the urls in a comma separated list:

      <filter-mapping>
      	<filter-name>CORS</filter-name>
      	<url-pattern>/services/sampleservice1/*,/services/sampleservice2/*</url-pattern>
      </filter-mapping>

      Alternatively, you can add two separate filter mappings:

      <filter-mapping>
      	<filter-name>CORS</filter-name>
      	<url-pattern>/services/sampleservice1/*</url-pattern>
      </filter-mapping>
      <filter-mapping>
      	<filter-name>CORS</filter-name>
      	<url-pattern>/services/sampleservice2/*</url-pattern>
      </filter-mapping>
  5. Restart the server.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.