You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide access to the remote IP address in a handler #671
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.
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.
Activity
m4tx commentedon Sep 14, 2026
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.