Skip to content

Commit 6ff9e83

Browse files
committed
docs: request.assigns -> conn.assigns
1 parent dc25722 commit 6ff9e83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/topics/modify-conn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ Return rate limiting information to clients:
122122
```elixir
123123
index :read do
124124
modify_conn(fn conn, _subject, _result, request ->
125-
# Assume we have rate limiting info in the request assigns
126-
rate_limit_info = request.assigns[:rate_limit] || %{}
125+
# Assume we have rate limiting info in the conn assigns
126+
rate_limit_info = conn.assigns[:rate_limit] || %{}
127127

128128
conn
129129
|> Plug.Conn.put_resp_header("x-ratelimit-limit", to_string(rate_limit_info[:limit] || 100))

0 commit comments

Comments
 (0)