Caddy: v0.10 proxy without does not work

Created on 21 Apr 2017  Â·  11Comments  Â·  Source: caddyserver/caddy

1. What version of Caddy are you running (caddy -version)?

v 0.10

2. What are you trying to do?

in proxy directive use without to trim prefix

3. What is your entire Caddyfile?

like this

proxy /help localhost:60165 {
    without /help
}

4. How did you run Caddy (give the full command and describe the execution environment)?

caddy -conf

5. Please paste any relevant HTTP request(s) here.

curl myhost.com/help

6. What did you expect to see?

see what curl localhost:60165 returns

7. What did you see instead (give full error messages and/or log)?

404 Page not found

the without prefix dose not work. the request uri is /help not /

bug

Most helpful comment

After a couple other bugs have been fixed - new releases are easy now :tada: so they'll probably happen more often.

All 11 comments

I had the exact same problem noticed some minutes ago after the upgrade to 0.10. The 0.9.5 release does not have this bug, so I reverted to it.

Hmm, this issue is introduced by this commit.
My fault for not taking without into account...

Yup, just got bitten by this

Same here, with master, 0.10, 0.9.5, 0.9.4 this Caddyfile:

http://www.lam.local {
  log stdout
  proxy /mattermost gitlab:80 {
    without mattermost
    header_upstream Host mattermost.lam.local
    header_upstream X-Real-IP {remote}
    header_upstream X-Forwarded-For {remote}
    header_upstream X-Forwarded-Proto {scheme}
  }
  tls off
}

Caddy log:

caddy_1   | 172.20.0.1 - - [24/Apr/2017:14:51:40 +0000] "GET /mattermost HTTP/1.1" 200 1382

Gitlab Log:

lab_1  | 172.20.0.3 - - [24/Apr/2017:14:51:40 +0000] "GET /mattermost HTTP/1.1" 200 1394 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.138 Safari/537.36 Vival
di/1.8.770.56"

@jazoom This issue should be fixed on the latest master, I checked 0775f91, it works as expected.

@jgsqware There is a mistake in your caddyfile: without /mattermost, just add a prefix slash.

Yep, looks like this was fixed in https://github.com/mholt/caddy/commit/f8614b877dd9c3b4280883883ee6c45b2fba8c6e

Any rough ETA on when that will land in a release? (this is blocking us from an upgrade to 0.10)

After a couple other bugs have been fixed - new releases are easy now :tada: so they'll probably happen more often.

Thanks @Tw !

Le mar. 25 avr. 2017 04:36, Matt Holt notifications@github.com a écrit :

After a couple other bugs have been fixed - new releases are easy now 🎉

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mholt/caddy/issues/1604#issuecomment-296875103, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADJrq5gQ_xK1uqVECttl_d-TBXmCsEPdks5rzVwdgaJpZM4NEGO7
.

I'm new to Caddy. Where can I download an older version of Caddy to use until this fix lands?

@tonyhschu Welcome! The releases page ought to do the trick. :)

I am seeing this issue in the :latest tag on docker

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muhammadmuzzammil1998 picture muhammadmuzzammil1998  Â·  3Comments

ericmdantas picture ericmdantas  Â·  3Comments

wayneashleyberry picture wayneashleyberry  Â·  3Comments

xfzka picture xfzka  Â·  3Comments

treviser picture treviser  Â·  3Comments