Skip to content

Commit

Permalink
util: use http.Request.Referer method instead of reading header directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed Apr 4, 2024
1 parent 56564d8 commit 50ef67c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func RedirectBack(r *http.Request) *http.Request {
if err != nil {
r.URL = current
} else {
current, err = url.Parse(r.Header.Get("Referer"))
current, err = url.Parse(r.Referer())
if err == nil {
r.URL = current
}
Expand Down

0 comments on commit 50ef67c

Please sign in to comment.