Skip to content

Provide access to the remote IP address in a handler #671

Description

@Wervice

Problem statement

Currently, I see no way to get the remote IP address inside the handler, which may be necessary for logging, rate-limiting, login-control and so on.

Proposed solution

Cot could provide a remote_addr: IpAddr inside as a handler argument.

Alternatives considered

No response

Drawbacks

No response

Additional context

I tried to workaround this problem myself by writing my own middleware, but I could not find an explanation on how to do so nor an answer to the question whether making own middleware is an intended use of Cots' API.

Activity

  1. added theissue type on Sep 13, 2026
  2. m4tx commented on Sep 14, 2026

    @m4tx
    Member

    Hey! Yes, custom middlewares are of course supported, but not really documented yet - we have #597 for tracking this, and I think we'll prioritize this soon.

    I recently bumped into the same problem when I tried to integrate Akismet spam detection service into one of my projects, so this should be resolved soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions