<p>I have deployed ambassador edge stack and I am using hosts and mapping resources to route my traffic. I want to implement the mapping in such a way that if there is any double slash in the path, using regex (or any other available way) to remove one slash from it.
For example, if client request <code>https://a.test.com//testapi</code> I want it to be <code>https://a.test.com/testapi</code>.</p>
<p>I search through the ambassador documents but I am unable to find anything that can be of help.</p>
<p>Thank You</p>

Susanta Gautam
<p>There is the <a href="https://www.getambassador.io/docs/emissary/1.14/topics/running/ambassador/#the-module-resource" rel="nofollow noreferrer">Module Resource</a> for emissary ingress.</p>
<blockquote>
<p>If present, the Module defines system-wide configuration. This module can be applied to any Kubernetes service (the ambassador service itself is a common choice). You may very well not need this Module. To apply the Module to an Ambassador Service, it MUST be named ambassador, otherwise it will be ignored. To create multiple ambassador Modules in the same namespace, they should be put in the annotations of each separate Ambassador Service.</p>
</blockquote>
<p>You should add this to the module's yaml file:</p>
<pre><code>spec:
...
  config:
...
    merge_slashes: true
</code></pre>
<blockquote>
<p>If true, Emissary-ingress will merge adjacent slashes for the purpose of route matching and request filtering. For example, a request for //foo///bar will be matched to a Mapping with prefix /foo/bar.</p>
</blockquote>
