-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: server access logs contain the protocol used between the server … #1657
Conversation
…and the load balancer, but not the protocol used between the client and the load balancer
Codecov Report
@@ Coverage Diff @@
## master #1657 +/- ##
==========================================
+ Coverage 71.06% 71.11% +0.04%
==========================================
Files 445 445
Lines 42492 42496 +4
==========================================
+ Hits 30198 30222 +24
+ Misses 10391 10375 -16
+ Partials 1903 1899 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
net/ghttp/ghttp_request.go
Outdated
proto = r.Header.Get("X-Forwarded-Proto") | ||
) | ||
|
||
if r.TLS != nil || (proto != "" && strings.ToLower(proto) == "https") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if r.TLS != nil || gstr.Equal(proto, "https") {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also update here:
gf/net/ghttp/ghttp_server_log.go
Line 22 in 8f326dc
if r.TLS != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled
…and the load balancer, but not the protocol used between the client and the load balancer
#1655