outposts: also send outpost type
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
8d766efecb
commit
dd82d55725
|
@ -40,7 +40,7 @@ func getEnv() string {
|
|||
return "custom"
|
||||
}
|
||||
|
||||
func analytics(akURL url.URL, on string) {
|
||||
func analytics(akURL url.URL, on string, t string) {
|
||||
if _, s := os.LookupEnv("AUTHENTIK_DISABLE_ANALYTICS"); s {
|
||||
return
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ func analytics(akURL url.URL, on string) {
|
|||
}{
|
||||
Domain: "authentik",
|
||||
Name: "pageview",
|
||||
URL: fmt.Sprintf("http://localhost/outpost/%s", e),
|
||||
URL: fmt.Sprintf("http://localhost/outpost/%s/%s", e, t),
|
||||
Referrer: fmt.Sprintf("%s (%s)", constants.VERSION, constants.BUILD()),
|
||||
}
|
||||
b, err := json.Marshal(body)
|
||||
|
|
|
@ -67,7 +67,7 @@ func NewAPIController(akURL url.URL, token string) *APIController {
|
|||
}
|
||||
outpost := outposts.Results[0]
|
||||
doGlobalSetup(outpost.Config)
|
||||
go analytics(akURL, outpost.Name)
|
||||
go analytics(akURL, outpost.Name, string(outpost.Type))
|
||||
|
||||
log.WithField("name", outpost.Name).Debug("Fetched outpost configuration")
|
||||
|
||||
|
|
Reference in New Issue