Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 30dd63b

Browse files
committed
update cloudflarewarp.go
1 parent c9ff573 commit 30dd63b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: cloudflarewarp.go

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ func (r *RealIPOverWriter) ServeHTTP(rw http.ResponseWriter, req *http.Request)
9999
http.Error(rw, "Unknown source", http.StatusUnprocessableEntity)
100100
return
101101
}
102+
if req.Header.Get(cfConnectingIP) == "" && trustResult.trusted {
103+
req.Header.Set(xCfTrusted, "yes")
104+
r.next.ServeHTTP(rw, req)
105+
return
106+
}
102107
if trustResult.trusted {
103108
if req.Header.Get(cfVisitor) != "" {
104109
var cfVisitorValue CFVisitorHeader

0 commit comments

Comments
 (0)