When I do a SAST scan of my go code, a vulnerability is detected in the following line
http.Redirect(w, r, "/", http.StatusSeeOther)
Vulnerability Description: Potential use of variable for URL detected
Cause: Whenever a URL is constructed from the data provided by the user, an attacker may be able to exploit security vulnerabilities such as Phishing and Trojan Horse attacks, by manipulating the URL using user-defined values. User-provided data can come from a variety of sources, including URL-based parameters, ActionForm properties, HTTP headers or cookies.
Fix Recommendation: Avoid using user-provided data in the URL. Validate all user-provided data before constructing the URL.
In Redirect method, the URL mentioned in hardcoded. No variable is used for URL. How can this vulnerability be fixed?