koa-proxies icon indicating copy to clipboard operation
koa-proxies copied to clipboard

Incorrect URL in logging when using target path

Open milgner opened this issue 4 years ago • 3 comments

After defining a proxy target that includes a URL prefix (http://myproxy/some/path), the requests are proxied to the correct target URL, but the path component of the proxy target is left out of the log message.

I.e. a call to http://myapp/endpoint would call http://myproxy/some/path/endpoint but log a redirect to http://myproxy/endpoint instead.

milgner avatar Apr 20 '20 06:04 milgner

I can confirm what @milgner is reporting here. Looks like the issue is that you are using the URL function in the log call

ralphiech avatar Sep 08 '20 12:09 ralphiech

@milgner could you please provide a log with your sample?

I test it using the https://github.com/vagusX/koa-proxies/tree/master/samples/js project, and it seems ok

image

vagusX avatar Apr 08 '21 05:04 vagusX

Confirming this also happens to me.

aecorredor avatar Dec 16 '21 22:12 aecorredor