went through entire function and found below issues 1. This function returns a function with three return values. But your handleMiddlewareResponse only returns two values. 2. use below code to parsing cookies from the header. ``` header := http.Header{} for k, v := range req.Headers { header.Set(k, v) } reqCookies := header["Cookie"] ``` 3. You are ignoring the error here. If LoadEnvConfig() fails, it might return empty/default config which could result in missing cookieName. _Originally posted by @iamitprakash in https://github.com/Real-Dev-Squad/feature-flag-backend/pull/157#discussion_r2105901968_