EnableSlashMerge plug-in

Updated at:

When enabled, the EnableSlashMerge plug-in preprocesses an HTTP request by merging adjacent slashes in its path before the request reaches a workload. For example, a path like /a///b is normalized to /a/b. This plug-in requires no configuration fields and takes effect immediately once enabled.

Prerequisites

Configuration example

Verify behavior when disabled

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway.

  3. In the Kubernetes Service column, find the IP address of the deployed gateway. Open http://{gateway_ip}/encoding/utf8 in a browser. A page with the title Unicode Demo is displayed. Then, open http://{gateway_ip}/encoding///utf8. A page with the title Not Found is displayed. This occurs because the redundant slashes in the path prevent the httpbin service from finding the requested content.

Verify behavior when enabled

  1. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose Plugin Extension Center > Market Place.

  2. On the Plug-in configuration tab, enable the EnableSlashMerge plug-in and select global as the effective scope. Open http://{gateway_ip}/encoding///utf8 in a browser. A page with the title Unicode Demo is displayed. The plug-in merges the redundant slashes, allowing the httpbin service to find the correct content.

    Note

    If you do not see the expected result, it may be due to browser caching. To ensure an accurate test, clear your browser's cache or open a new incognito window.