Skip to content
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

Merged
merged 6 commits into from
Mar 9, 2022

Conversation

houseme
Copy link
Member

@houseme houseme commented Mar 9, 2022

…and the load balancer, but not the protocol used between the client and the load balancer

#1655

…and the load balancer, but not the protocol used between the client and the load balancer
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #1657 (f6054ab) into master (8f326dc) will increase coverage by 0.04%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
go-1.15 71.07% <85.71%> (+0.02%) ⬆️
go-1.16 71.06% <85.71%> (+0.02%) ⬆️
go-1.17 71.04% <85.71%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
net/ghttp/ghttp_request.go 79.38% <83.33%> (+0.64%) ⬆️
net/ghttp/ghttp_server_swagger.go 75.00% <100.00%> (ø)
container/gtree/gtree_avltree.go 96.53% <0.00%> (+0.57%) ⬆️
os/glog/glog_logger_rotate.go 67.31% <0.00%> (+1.46%) ⬆️
net/gtcp/gtcp_pool.go 38.63% <0.00%> (+4.54%) ⬆️
os/gcache/gcache_adapter_memory_lru.go 97.91% <0.00%> (+8.33%) ⬆️
os/gspath/gspath_cache.go 94.73% <0.00%> (+10.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f326dc...f6054ab. Read the comment docs.

proto = r.Header.Get("X-Forwarded-Proto")
)

if r.TLS != nil || (proto != "" && strings.ToLower(proto) == "https") {
Copy link
Member

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") {

Copy link
Member

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:

if r.TLS != nil {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handled

@houseme houseme requested a review from gqcn March 9, 2022 13:40
@gqcn gqcn merged commit 465100a into gogf:master Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants