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: enable "real" client IP visibility even behind proxies #2963

Closed
wants to merge 5 commits into from

Conversation

999LV
Copy link
Contributor

@999LV 999LV commented Feb 14, 2023

Complements b1dc1a4

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4174501850

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 23.832%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app.ts 0 3 0.0%
Totals Coverage Status
Change from base Build 4174314480: -0.004%
Covered Lines: 3818
Relevant Lines: 16921

💛 - Coveralls

@robertsLando
Copy link
Member

I think it would be better to enable this based on an env var. @chrisns agree?

@chrisns
Copy link
Member

chrisns commented Feb 15, 2023

I don't think we actually care in zwjs-ui what the ip is, apart from maybe logging?

agree, if we're going to define it must be an env var / config

setting trust to true is a really bad idea (though at the user's discretion if its configurable), it should really be more specific, and must only enabled in situations where a proxy is present, otherwise an actor with direct access could use it to masquerade as any ip they like.

I suspect most users don't have this behind a proxy (which is why auth exists within the app etc)

https://expressjs.com/en/guide/behind-proxies.html

@chrisns chrisns marked this pull request as draft February 15, 2023 08:46
@chrisns
Copy link
Member

chrisns commented Feb 15, 2023

moved to draft, if its changed to be configurable, somewhere then it can be ready to review again.

@999LV
Copy link
Contributor Author

999LV commented Feb 15, 2023

Got your points, thank you. I'll resubmit based on an environment variable configuration (with default to 'false' so that it is really a user conscious decision)

@999LV
Copy link
Contributor Author

999LV commented Feb 18, 2023

On thinking further about this « origin ip » topic, I think it is better to withdraw that pull request indeed since it does not bring much but creates other risks. Apologies.

@coveralls
Copy link

coveralls commented Sep 30, 2024

Pull Request Test Coverage Report for Build 4174501850

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 23.832%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app.ts 0 3 0.0%
Totals Coverage Status
Change from base Build 4174314480: -0.004%
Covered Lines: 3818
Relevant Lines: 16921

💛 - Coveralls

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.

5 participants