Closed
Conversation
Changed Request.uws_request to the new AnyRequestContext. This allows grabbing the IP from a Request. Unfinished.
Currently using uws's requestIpAsText, which always returns a ipv6 string. We should return a `SocketAddress` object to the user instead, which will contain the formatted address string and what type it is. We'll have to use requestIpAsBinary and parse that ourselves.
if we can't get the ip.
4 tasks
Contributor
|
Any updates on this? |
|
Any updates on this? |
|
Any...updates? |
I guess there are other currently important issuess.. but I'd love this to get checked |
2 tasks
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.
What does this PR do?
Closes #3540
Implements
server.requestIp(request), returning the origin IP address of a Request.Currently it just returns an ipv6 address string directly from UWS. The plan is to return a "SocketAddress" object, which will contain the address string and a value signaling what type it is.
How did you verify your code works?
I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
I or my editor ran
zig fmton the changed filesI included a test for the new code, or an existing test covers it
JSValue used outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed
I added TypeScript types for the new methods, getters, or setters
I ran
make codegento regenerate the C++ and Zig code