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

Use direct peer socket address #662

Merged
merged 1 commit into from
Oct 21, 2019
Merged

Conversation

axw
Copy link
Member

@axw axw commented Oct 21, 2019

context.request.socket.remote_address should have the direct peer socket (IP) address, not the originating client address. This means we should not parse Forwarded, X-Forwarded-For, etc. in order to determine this field's value. That should instead be left to the server.

Closes #659

context.request.socket.remote_address should
have the direct peer socket (IP) address, not
the originating client address. This means we
should not parse Forwarded, X-Forwarded-For,
etc. in order to determine this field's value.
That should instead be left to the server.
@codecov-io
Copy link

codecov-io commented Oct 21, 2019

Codecov Report

Merging #662 into master will decrease coverage by 0.44%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #662      +/-   ##
=========================================
- Coverage   88.35%   87.9%   -0.45%     
=========================================
  Files         123     123              
  Lines        7891    7625     -266     
=========================================
- Hits         6972    6703     -269     
- Misses        798     819      +21     
+ Partials      121     103      -18
Impacted Files Coverage Δ
context.go 96.33% <100%> (+1.64%) ⬆️
internal/apmhttputil/url.go 97.95% <100%> (+0.04%) ⬆️
internal/apmhttputil/remoteaddr.go 100% <100%> (ø) ⬆️
model/marshal_fastjson.go 77.1% <0%> (-5.58%) ⬇️
utils.go 82.69% <0%> (-0.19%) ⬇️

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 ba7aeb4...f4e4952. Read the comment docs.

@axw axw merged commit c0a5ebf into elastic:master Oct 21, 2019
@axw axw deleted the remoteaddr-peer-address branch October 21, 2019 03:10
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.

Send immediate request remote address in context.request.socket.remote_address
2 participants