From e2e2ad18223a357ad7bacf6b38d13a9b1858abbe Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Fri, 24 Nov 2023 11:26:12 +0100 Subject: [PATCH] replace query with header --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 50fa232..a2841b9 100644 --- a/main.go +++ b/main.go @@ -53,9 +53,9 @@ func handleRequest(w http.ResponseWriter, r *http.Request) { return } - // Parse query parameters - device := r.URL.Query().Get("d") - user := r.URL.Query().Get("u") + // Extract values from headers + device := r.Header.Get("X-Limit-D") + user := r.Header.Get("X-Limit-U") log.Infof("Received request with device=%s and user=%s", device, user)