replace query with header
This commit is contained in:
parent
2a4e2c86f6
commit
e2e2ad1822
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -53,9 +53,9 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse query parameters
|
// Extract values from headers
|
||||||
device := r.URL.Query().Get("d")
|
device := r.Header.Get("X-Limit-D")
|
||||||
user := r.URL.Query().Get("u")
|
user := r.Header.Get("X-Limit-U")
|
||||||
|
|
||||||
log.Infof("Received request with device=%s and user=%s", device, user)
|
log.Infof("Received request with device=%s and user=%s", device, user)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue