mirror of
https://github.com/benbusby/farside.git
synced 2025-05-07 11:00:03 +00:00
Fix formatting
This commit is contained in:
parent
3181bdfc80
commit
fec966ae59
3 changed files with 8 additions and 5 deletions
|
@ -4,9 +4,11 @@ defmodule Farside.Throttle do
|
|||
|
||||
rule "throttle per ip", conn do
|
||||
# throttle to 1 request per second
|
||||
throttle conn.remote_ip,
|
||||
period: 1_000, limit: 1,
|
||||
throttle(conn.remote_ip,
|
||||
period: 1_000,
|
||||
limit: 1,
|
||||
storage: {PlugAttack.Storage.Ets, Farside.Throttle.Storage}
|
||||
)
|
||||
end
|
||||
|
||||
def allow_action(conn, _data, _opts), do: conn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue