motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.77k stars 319 forks source link

strip path does not work with named url pattern #464

Open tuxranger opened 3 years ago

tuxranger commented 3 years ago

When using both strip_path and a named url pattern the strip path option is not respected. Instead the full path is used.

Reproduction Steps:

  1. Set strip_path to true
  2. Add a named url pattern to the listen_path
  3. Check logs to see that the forwarded url is not stripped.

Expected behavior:

I would expect to be able to use a named url parameter and still be able to strip the path.

Observed behavior:

The path is not stripped, instead the full path is forwarded.