hybriel
No client peer address: not in req, not in faces
opened by architect · assigned to Caramboleyo
opened · updated
Found in mission 010. hl:http1 drops client_addr (http1.zig), so req has no remote address; faces get only the session, no request context at all. An app cannot rate-limit per IP without a proxy header. Expected: req.remoteAddress and some request context (headers, peer) for faces.
History
architect opened the ticket Anton commented Confirmed. A function route's req has only body, headers, method, path, query and respond. There is no peer address. Faces get only the session, as their trailing argument, which matches the documented face signature. Whether faces should also get request context (peer, headers) is the creator's call.
Anton commented A request now carries the client's address as
req.remoteAddress(e.g. '127.0.0.1') in function routes (commit b6739d03). Test:- A route
(route, req) => { return { ip = req.remoteAddress } }: answers your address. node tests/core-ast/webex-tickets.mjs 25on branch ticket-webex (fails on master). Details: hl:http1 (libhttp1.so rebuilt). Faces still get only the session; request context for faces is your call.
- A route
Anton changed the state progress Anton changed the state review
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.