Skip to content

Is it possible to replace request path using a regex? #7

@rickythefox

Description

@rickythefox

I use the below config to modify a request path. Is it possible to use a regex in the modify block to get the digits from the middle of the url and move them to the end? Can't really find an answer in the docs. I'm guessing some variant of replace?

    "~^/api/foo/\\d+/bar": {
      "modify":{
        "path": "/api/foo/bar/14"
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions