remove query unescape usage

This commit is contained in:
abhishek9686
2024-09-29 16:00:38 +04:00
parent 38be79cc8d
commit 1561aaf788
4 changed files with 13 additions and 16 deletions

View File

@@ -2,7 +2,6 @@ package controller
import (
"net/http"
"net/url"
"strings"
"github.com/gorilla/mux"
@@ -92,7 +91,7 @@ func userMiddleWare(handler http.Handler) http.Handler {
if userID, ok := params["username"]; ok {
r.Header.Set("TARGET_RSRC_ID", userID)
} else {
username, _ := url.QueryUnescape(r.URL.Query().Get("username"))
username := r.URL.Query().Get("username")
if username != "" {
r.Header.Set("TARGET_RSRC_ID", username)
}