implement token bucket rate limiting
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
<h1>Too Many Requests</h1>
|
||||
<p>You can only make <%= CurrentUser.api_hourly_limit(false) %> updates and <%= CurrentUser.api_hourly_limit(true) %> reads per hour.</p>
|
||||
<p>Please rate limit yourself</p>
|
||||
@@ -153,6 +153,14 @@
|
||||
(<%= link_to "help", wiki_pages_path(title: "help:api") %>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>API Limits</th>
|
||||
<td>
|
||||
<%= CurrentUser.user.remaining_api_limit %>
|
||||
/ <%= CurrentUser.user.api_burst_limit %>,
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user