outposts/proxy: add X-authentik-meta-version

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-12-01 20:41:55 +01:00
parent f2023a7af2
commit d0ceafe79e
4 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,8 @@ import (
"fmt"
"net/http"
"strings"
"goauthentik.io/internal/constants"
)
func (a *Application) addHeaders(headers http.Header, c *Claims) {
@ -28,6 +30,7 @@ func (a *Application) addHeaders(headers http.Header, c *Claims) {
headers.Set("X-authentik-meta-outpost", a.outpostName)
headers.Set("X-authentik-meta-provider", a.proxyConfig.Name)
headers.Set("X-authentik-meta-app", a.proxyConfig.AssignedApplicationSlug)
headers.Set("X-authentik-meta-version", constants.OutpostUserAgent())
userAttributes := c.Proxy.UserAttributes
// Attempt to set basic auth based on user's attributes