Skip to content

Commit f2881db

Browse files
committed
improving autoref
1 parent f0e464f commit f2881db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/httpx/httpx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ func (h *HTTPX) SetCustomHeaders(r *retryablehttp.Request, headers map[string]st
435435
userAgent := useragent.PickRandom()
436436
r.Header.Set("User-Agent", userAgent.Raw) //nolint
437437
}
438-
if h.Options.AutoReferer {
438+
if h.Options.AutoReferer && r.Header.Get("Referer") == "" {
439439
r.Header.Set("Referer", r.URL.String())
440440
}
441441
}

0 commit comments

Comments
 (0)