diff --git a/internal/cli/serve/command.go b/internal/cli/serve/command.go index c49c637..8f1ea22 100644 --- a/internal/cli/serve/command.go +++ b/internal/cli/serve/command.go @@ -317,13 +317,18 @@ func (cmd *command) Run(ctx context.Context, log *logger.Logger, cfg *config.Con // url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Flost-in-space.json // &query=%24.count&label=Used%20times) go func() { + var tpl = url.QueryEscape(cfg.TemplateName) + req, reqErr := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf( - "https://error-pages.goatcounter.com/count?event=true&p=/use-template/%s", url.QueryEscape(cfg.TemplateName), + // https://www.goatcounter.com/help/pixel + "https://error-pages.goatcounter.com/count?e=true&p=/use-template/%s&t=%s", tpl, tpl, ), http.NoBody) if reqErr != nil { return } + req.Header.Set("User-Agent", "error-pages") // by default, the User-Agent is "Go-http-client/x.x" + resp, respErr := (&http.Client{Timeout: 10 * time.Second}).Do(req) //nolint:mnd // don't care about the response if respErr != nil { log.Debug("Cannot send a request to increment the template usage counter", logger.Error(respErr)) diff --git a/templates/app-down.html b/templates/app-down.html index 2179fcd..7a08194 100644 --- a/templates/app-down.html +++ b/templates/app-down.html @@ -500,7 +500,7 @@ - + diff --git a/templates/cats.html b/templates/cats.html index ce92b85..beba6c0 100644 --- a/templates/cats.html +++ b/templates/cats.html @@ -157,7 +157,7 @@ - + diff --git a/templates/connection.html b/templates/connection.html index c53f999..27193f0 100644 --- a/templates/connection.html +++ b/templates/connection.html @@ -456,7 +456,7 @@ - + diff --git a/templates/ghost.html b/templates/ghost.html index edb3020..8bcb982 100644 --- a/templates/ghost.html +++ b/templates/ghost.html @@ -243,7 +243,7 @@ - + diff --git a/templates/hacker-terminal.html b/templates/hacker-terminal.html index 821776e..7eb344e 100644 --- a/templates/hacker-terminal.html +++ b/templates/hacker-terminal.html @@ -180,7 +180,7 @@ - + diff --git a/templates/l7.html b/templates/l7.html index 0c6767d..3dbf358 100644 --- a/templates/l7.html +++ b/templates/l7.html @@ -165,7 +165,7 @@ - + diff --git a/templates/lost-in-space.html b/templates/lost-in-space.html index a92cc0b..1cbfa5f 100644 --- a/templates/lost-in-space.html +++ b/templates/lost-in-space.html @@ -449,7 +449,7 @@ - + diff --git a/templates/orient.html b/templates/orient.html new file mode 100644 index 0000000..1f24efd --- /dev/null +++ b/templates/orient.html @@ -0,0 +1,273 @@ + + + + + + {{ message }} + + + + + + + + + + + + + +
+
+
+
{{code}}
+
+

{{ description }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Host{{ host }}
Original URI{{ original_uri }}
Forwarded for{{ forwarded_for }}
Namespace{{ namespace }}
Ingress name{{ ingress_name }}
Service name{{ service_name }}
Service port{{ service_port }}
Request ID{{ request_id }}
Timestamp{{ now.Unix }}
+
+ +
+
+
+
+
+
+ + + + + + diff --git a/templates/shuffle.html b/templates/shuffle.html index 65f3674..fcaff61 100644 --- a/templates/shuffle.html +++ b/templates/shuffle.html @@ -261,7 +261,7 @@ - +