Conversation
Codecov Report
@@ Coverage Diff @@
## main #503 +/- ##
==========================================
- Coverage 82.41% 82.40% -0.02%
==========================================
Files 31 31
Lines 3549 3580 +31
Branches 528 531 +3
==========================================
+ Hits 2925 2950 +25
- Misses 624 630 +6
|
pi0
reviewed
Aug 11, 2023
Member
|
Thanks for PR! I love it it is a must have util! /cc @danielroe @atinux @antfu about naming ideas. I like the current |
Contributor
|
Nice! I like |
Member
|
Agreed on And nice work. |
iainsproat
reviewed
Aug 11, 2023
iainsproat
reviewed
Aug 11, 2023
Contributor
Author
|
With the introduction of this utility, it's important to consider this issue #504 As you can see, it's common for module authors to be trusting easily spoofed headers atm. |
pi0
reviewed
Aug 14, 2023
pi0
approved these changes
Aug 14, 2023
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
#272
❓ Type of change
📚 Description
We should make it convenient for users to get the client request ip while being able to opt-in to trust the x-forwarded-for header.
Currently, users are implementing themselves:
I'm also open to naming this
getClientIporgetRequestClientIp.This utility does open the door for trusting spoofable headers (see nuxt-security), sorting that is out of the scope of this utility, I'll open this as a seperate issue.
📝 Checklist