Caddy2 X-Forwarded-User

1. My Caddy version 2.0.0-rc1

2. How I run Caddy:

xxx.url

basicauth /* {
xxx
}

route /* {
reverse_proxy 127.0.0.1:8080 {
header_up X-Forwarded-User {http.handlers.authentication.user}
}
}

a. System environment:

caddy on linux

b. Command:

caddy run

3. The problem I’m having:

how can i pass the user that autenticated to basicauth to my backend server?
is it possible to sign this request somehow?

I just dug through the code, I think you can use this replacer:

{http.auth.user.id}

In other words:

header_up X-Forwarded-User {http.auth.user.id}
1 Like

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