1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 22:39:18 +01:00

fix: fixes bugs with reporting on addr and base (#2521)

This commit is contained in:
Amir Raminfar
2023-11-21 14:14:54 -08:00
committed by GitHub
parent 38c4d9e4b7
commit 47bc4b7fc5
2 changed files with 4 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ type BeaconEvent struct {
Browser string `json:"browser"`
AuthProvider string `json:"authProvider"`
FilterLength int `json:"filterLength"`
RemoteHostLength int `json:"remoteHostLength"`
Clients int `json:"clients"`
HasDocumentation bool `json:"hasDocumentation"`
HasCustomAddress bool `json:"hasCustomAddress"`
HasCustomBase bool `json:"hasCustomBase"`

View File

@@ -39,9 +39,9 @@ func (h *handler) streamEvents(w http.ResponseWriter, r *http.Request) {
Browser: r.Header.Get("User-Agent"),
AuthProvider: string(h.config.Authorization.Provider),
HasHostname: h.config.Hostname != "",
HasCustomBase: h.config.Base != "",
HasCustomAddress: h.config.Addr != "",
RemoteHostLength: len(h.clients),
HasCustomBase: h.config.Base != "/",
HasCustomAddress: h.config.Addr != ":8080",
Clients: len(h.clients),
HasDocumentation: len(pages) > 0,
}