Commit Graph

33 Commits (export-buildtree)

Author SHA1 Message Date
nickajacks1 97da409533
🎨 Style!: Update CSRF and Limiter to remove repetitive names (#2846)
chore!: Update CSRF and Limiter to remove repetitive names

The `exported` rule of revive warns to not repeat the package name in
method names. For example, prefer `csrf.FromCookie` over
`csrf.CsrfFromCookie`.

This is a breaking change for v3.

It appears that these issues will not be caught by the linter until the
`exported` rule is reenabled. This requires comments on all exported
symbols, which is a much broader effort.
2024-02-10 19:50:29 +01:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
Gusted e6feb36827
feat: add sliding window as option for limiter middleware (#1580)
- Add the options to use your own middleware(should be more modular over time).
- Add the Sliding window option(see #1247)
- A little bit better polished version of #1247.
2021-10-18 09:13:53 +02:00
Ali Eren Öztürk 9c37b4c1c5
Fix limit middleware skip options (#1568)
* fix limit middleware skip options

* fix limiter middleware remaining count

* used constant StatusBadRequest instead of int 400
2021-10-11 18:31:37 +02:00
Ali Eren Öztürk 2aef5f8e01
limiter middleware new options: SkipFailedRequests, SkipSuccessfulRequests (#1542) 2021-09-28 10:10:29 +02:00
Fenny a468af7762 🩹 fix mutex lock 2020-11-23 07:44:06 +01:00
Fenny 323d9d89cc 🩹 fix manager logic 2020-11-23 07:38:42 +01:00
Fenny 8fe458011d 📦 add mapstore 2020-11-20 11:43:07 +01:00
Fenny 70a3a4dc21 🩹 fix limiter 2020-11-11 18:28:27 +01:00
Fenny 8bd50de610 🧹 housekeeping 2020-11-11 13:54:27 +01:00
Fenny 7892ab62bf 📦 update Storage behaviour 2020-10-31 07:51:44 +01:00
Fenny ecdda95e15 💼 implement Storage 2020-10-28 02:29:47 +01:00
Fenny 32fdbf0ddf ✏ rename variable 2020-10-27 10:58:51 +01:00
Fenny 8334eb1f9e 🏬 clean storage in limiter 2020-10-27 08:12:53 +01:00
Tom c4dfe9a500
📦 Remove unused imports 2020-10-26 21:28:51 +00:00
Tom 847a7b5518
Merge remote-tracking branch 'origin/limiter-custom-store' into limiter-custom-store 2020-10-26 21:26:33 +00:00
Tom 66d2e7deda
📦 Switch to fiber.Storage and msgp 2020-10-26 21:25:30 +00:00
Tom 43e100f36c
📦 Make expiry of set keys cfg.Duration 2020-10-26 11:11:55 +00:00
Tom 3308a32a3a
📦 Change default configuration and add test for custom store 2020-10-26 11:11:55 +00:00
Tom bc3b69ccca
Fix gosec and tests 2020-10-26 11:11:54 +00:00
Tom 5c9f8a52fd
📦 Implement storage method switching 2020-10-26 11:11:54 +00:00
Tom e8e706c2b8
📦 Add storage interface to limiter middleware 2020-10-26 11:11:40 +00:00
Tom 90663b23b8
📦 Make expiry of set keys cfg.Duration 2020-10-21 19:57:24 +01:00
Tom 1976358338
📦 Change default configuration and add test for custom store 2020-10-10 15:34:45 +01:00
Tom fc11562191
Fix gosec and tests 2020-10-08 21:12:27 +01:00
Tom 27dbd393ad
📦 Implement storage method switching 2020-10-08 20:48:08 +01:00
Tom 99c9ba9425
📦 Add storage interface to limiter middleware 2020-10-08 19:54:39 +01:00
Fenny b31f6b2ba4 ✏ better readability 2020-09-16 22:16:41 +02:00
Fenny a06d072e43 🧹 remove comment 2020-09-15 20:55:44 +02:00
Fenny 2bf748c91a 🍌 use uint64 instead 2020-09-15 20:53:29 +02:00
Fenny 9fa54e4d69 🩹 fix limiter racce condition 2020-09-15 20:39:39 +02:00
Fenny d908716132 📦 fix limiter 2020-09-15 20:28:15 +02:00
Fenny ec5d66e7a8 v2 2020-09-13 11:20:11 +02:00