coupergateway / couper

Couper is a lightweight API gateway designed to support developers in building and operating API-driven Web projects
https://couper.io
MIT License
85 stars 15 forks source link

Endpoint wildcard proxy wildcard #655

Closed johakoch closed 1 year ago

johakoch commented 1 year ago

Fixed endpoint wildcard/proxy wildcard combination where wildcard matches "":

  endpoint "/**" {
    proxy {
      backend {
        origin = "http://localhost:8081"
        path = "/**"
      }
    }
  }

  endpoint "/a/**" {
    proxy {
      backend {
        origin = "http://localhost:8081"
        path = "/b/**"
      }
    }
  }

before:

now:


BTW, without

        path = "/**"

in the first endpoint, the backend request path was ok.

Non-empty-matches were ok, too:


Reviewer checklist
  • Read PR description: a summary about the changes is required
  • Changelog updated
  • Documentation: docs/{Reference, Cli, ...}, Docker and cli help/usage
  • Pulled branch, manually tested
  • Verified requirements are met
  • Reviewed the code
  • Reviewed the related tests
johakoch commented 1 year ago

I'll rebase to release.1.11