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

Remove Specific Request Headers From Response

Web services may contain response headers with sensitive information. This tutorial explains how to remove HTTP request headers from the responses for security reasons

  1. Shutdown the server if it is already running.
  2. Open the <API-M_HOME>/repository/deployment/server/synapse-configs/default/sequences/main.xml file.
  3. Add the name of the header to be removed as a property, just before the beginning of send mediator, as shown below

  4. Open the <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/fault.xml file.
  5. Add the name of the header to be removed as a property property, just before the beginning of "CORS request handler" sequence, as shown below.

  6. Start the server.


Note : The above method removes only the specified headers from the response. If you need to remove all the headers, follow the instructions below.
  1. Open the <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/main.xml file.

  2. Add the TRANSPORT_HEADERS property, after the beginning of the <out> sequence opening tag, as shown in the example below.

    Example
    <out>
    <property name="TRANSPORT_HEADERS" action="remove" scope="axis2"/>
  3. Open the <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/fault.xml file.
  4. Add the TRANSPORT_HEADERS property before the <send> mediator, as shown in the example below.

    Example
    <property name="TRANSPORT_HEADERS" action="remove" scope="axis2"/>
    <send/>
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.