Provide access to the remote IP address in a handler

オープン
#671 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Wervice がすでに取り組んでいます。

2026年10月4日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
Rust
スター
1.1k
フォーク
57
平均マージ
17時間 39分
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cot-rs/cot のほかの issue

cot-rs/cot の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。