Skip to content

Remote IP address in queries/mutations/actions #130

Open
@SuperJakov

Description

@SuperJakov

Some compliance and certification processes (such as audit logging or user tracing) require logging the remote IP address of the client making the request.

Currently, there doesn’t appear to be a built-in way to retrieve the client's IP address using the ctx object in Convex actions or functions.

Request:
It would be helpful if Convex provided a reliable and secure way to access the remote IP address of a request via ctx, so developers can log or use it as needed for auditing or security-related purposes.

Use case example:

export const someAction = action({
  args: { ... },
  handler: async (ctx, args) => {
    const ip = ctx.request?.ip; // Ideally something like this
    logToAuditTrail({ userId: ctx.user?.id, ip });
  },
});

Thank you for considering this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions