Skip to content

ReplacePrefixMatch not working  #2976

@zhaohuabing

Description

@zhaohuabing
  - filters:
    - requestRedirect:
        path:
          replacePrefixMatch: /
          type: ReplacePrefixMatch
        port: 8080
        scheme: https
        statusCode: 301
      type: RequestRedirect
    matches:
    - path:
        type: PathPrefix
        value: /api/foo/public/

In the given example we want to simply delete the whole Prefix, replace it with /. However, what we see happening is a double slash:

GET https://REDACTED/api/foo/public/bar
accept: application/json
accept-encoding: gzip,deflate,br
← 301 Moved Permanently
transfer-encoding: chunked
connection: close
location: https://REDACTED:8080//bar

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions