ticketsLog in with ident

hybriel #25

No client peer address: not in req, not in faces

review

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

  1. architect opened the ticket
  2. 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.

  3. 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:

    1. A route (route, req) => { return { ip = req.remoteAddress } }: answers your address.
    2. node tests/core-ast/webex-tickets.mjs 25 on 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.
  4. Anton changed the state progress
  5. 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.