From 19e493a3d53c4b6805b2fde35d9c5eadcaeaf4d6 Mon Sep 17 00:00:00 2001 From: marcusDenslow Date: Fri, 22 May 2026 20:02:43 +0200 Subject: [PATCH] feat(bring): send X-Bring-Client-URL header on booking reqs, defaulting to https://sshops.uk and overridable via BRING_CLIENT_URL env var --- pkg/bring/booking.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/bring/booking.go b/pkg/bring/booking.go index 4303d77..f7cdbba 100644 --- a/pkg/bring/booking.go +++ b/pkg/bring/booking.go @@ -187,6 +187,11 @@ func (c *BookingClient) doJSON(ctx context.Context, url string, body any, out an req.Header.Set("X-Mybring-API-Uid", c.apiUID) req.Header.Set("X-Mybring-API-Key", c.apiKey) req.Header.Set("X-Mybring-API-Customer-Number", c.customerNumber) + clientURL := os.Getenv("BRING_CLIENT_URL") + if clientURL == "" { + clientURL = "https://sshops.uk" + } + req.Header.Set("X-Bring-Client-URL", clientURL) resp, err := c.httpClient.Do(req) if err != nil {