outposts/proxy: add X-authentik-meta-version
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		@ -40,7 +40,6 @@ COPY --from=website-builder /work/website/help/ /work/website/help/
 | 
			
		||||
 | 
			
		||||
COPY ./cmd /work/cmd
 | 
			
		||||
COPY ./web/static.go /work/web/static.go
 | 
			
		||||
COPY ./website/static.go /work/website/static.go
 | 
			
		||||
COPY ./internal /work/internal
 | 
			
		||||
COPY ./go.mod /work/go.mod
 | 
			
		||||
COPY ./go.sum /work/go.sum
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,7 @@ import (
 | 
			
		||||
 | 
			
		||||
func (ws *WebServer) configureStatic() {
 | 
			
		||||
	statRouter := ws.lh.NewRoute().Subrouter()
 | 
			
		||||
	statRouter.Use(ws.staticHeaderMiddleware)
 | 
			
		||||
	indexLessRouter := statRouter.NewRoute().Subrouter()
 | 
			
		||||
	indexLessRouter.Use(web.DisableIndex)
 | 
			
		||||
	// Media files, always local
 | 
			
		||||
 | 
			
		||||
@ -42,6 +42,10 @@ Besides these user-specific headers, some application specific headers are also
 | 
			
		||||
 | 
			
		||||
    The authentik application's slug.
 | 
			
		||||
 | 
			
		||||
- X-authentik-meta-version: `authentik-outpost@1.2.3 (build=tagged)`
 | 
			
		||||
 | 
			
		||||
    The authentik outpost's version.
 | 
			
		||||
 | 
			
		||||
# HTTPS
 | 
			
		||||
 | 
			
		||||
The outpost listens on both 9000 for HTTP and 9443 for HTTPS.
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user