diff options
| author | Ben Busby <noreply+git@benbusby.com> | 2021-11-12 14:40:05 -0700 |
|---|---|---|
| committer | Ben Busby <noreply+git@benbusby.com> | 2021-11-12 14:40:05 -0700 |
| commit | fec966ae59af3de1d1098ca11192041402c039cb (patch) | |
| tree | 1ead47bd39bdfb6252d321c55f1ed26fd58d4c7a /lib | |
| parent | 3181bdfc80c1e712d84474f849408a6c5c22f20a (diff) | |
| download | farside-fec966ae59af3de1d1098ca11192041402c039cb.tar.gz | |
Fix formatting
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/farside/throttle.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/farside/throttle.ex b/lib/farside/throttle.ex index fc8b591..8bbf54c 100644 --- a/lib/farside/throttle.ex +++ b/lib/farside/throttle.ex @@ -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 |
