Proxy / Without

Hello,

I’m trying to use “proxy” like this:

:2015 {
ext .html
gzip
log / stdout
proxy /api host:port/foo {
without /api
}
}

I want to call localhost:2015/api/bar and going to host:port/foo/bar but I am going to host:port/foo/api/bar

I am doing something wrong?

Regards
Steven

It works fine for me with your caddyfile

What version of caddy are you using?

Caddy 0.9.3

My test:
curl -X GET http://127.0.0.1:2015/api/bar

Caddy log:
02/Dec/2016:21:54:14 +0100 [ERROR 502 /foo/api/bar] dial tcp 8.8.8.8:8081: i/o timeout
127.0.0.1 - [02/Dec/2016:21:54:14 +0100] “GET /foo/api/bar HTTP/1.1” 502 16

ok I see the issue. There is something going on .

So you want to raise it as an issue on github

github.com/mholt/caddy

Ok done: https://github.com/mholt/caddy/issues/1283

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.