1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-22 00:33:09 +00:00

65 Commits

Author SHA1 Message Date
Muhammed Efe Çetin
1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
Vadim Gerasimenko
c92a5056ae
🩹 Fix limiter middleware db connection (#1813)
* remove release() method

* Revert "remove release() method"

This reverts commit fdfc8da967204f58f0342a5141a00cc07e1cccac.

* Rearrange mutexes in limiter_fixed.go

* refactor limiter_fixed.go

* Update limiter_fixed.go

Co-authored-by: RW <rene@gofiber.io>
2022-03-15 12:41:28 +01:00
Vadim Gerasimenko
c5f11cc800
Fix comment relating to deprecated field (#1790) 2022-02-20 19:01:16 +03:00
Norbert Hauriel
569511eb78
📝 fix file names (#1747) (#1748) 2022-02-03 12:58:59 -05:00
Norbert Hauriel
d85ae2bce3
Doc(limiter): clarify variable name 'expire' (#1742)
This clarifies the intent of variable 'expire' by renaming to
the more understandable 'resetInSec'. All mentions are renamed as well.
2022-02-03 09:26:25 +01:00
Gusted
7b7dcf29f7
♻️ Tidy up the codebase (#1613)
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01:00
Gusted
36796ee7a1
fix: remove Test_Limiter_Cheat test (#1595) 2021-10-25 07:04:56 +02: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
sadfun
547bdb1c23
Change deprecated struct elements (#1335)
Duration and Store are deprecated, so we should show Expiration and Storage in example
2021-05-18 10:56:55 +02:00
JeffProd
22bbfead6f
Update README limiter 2020-12-26 14:22:17 +01:00
hi019
494474aebd
Merge branch 'master' into master 2020-12-13 22:08:51 -05:00
Joey
2e30da966a
Merge pull request #1025 from Fenny/master
📦 Update utils and middleware configs
2020-11-24 07:24:04 +01: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
hi019
bc7b240158 improve mw 2020-11-21 12:36:16 -05:00
Fenny
8fe458011d 📦 add mapstore 2020-11-20 11:43:07 +01:00
hi019
e828c17554 Standardize MW docs 2020-11-17 12:12:49 -05:00
Fenny
bb3a7fe5da 🩹 fix cache
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-11-17 08:33:07 +01:00
João Vitor
3df5ebbed6
changes request 2020-11-16 21:01:20 -03:00
João Vitor
7600e28cb9
update readme 2020-11-16 15:53:53 -03:00
Fenny
558d802cdd 🩹 Fix expiration check 2020-11-13 18:34:01 +01:00
Fenny
70a3a4dc21 🩹 fix limiter 2020-11-11 18:28:27 +01:00
Fenny
66ee4de7d8 🕊 rename token to key 2020-11-11 18:19:53 +01:00
Fenny
8bd50de610 🧹 housekeeping 2020-11-11 13:54:27 +01:00
Fenny
0d3d6d9fe8 📦 update fasthttp and storage interface 2020-11-06 01:52:05 +01:00
Fenny
7892ab62bf 📦 update Storage behaviour 2020-10-31 07:51:44 +01:00
Fenny
a90ebb7098 ✏ add msgp tags
Co-Authored-By: Tom <tom@tdpain.net>
2020-10-28 02:35:49 +01:00
Fenny
c863519f54 ✏ refactor unit test
Co-Authored-By: Tom <tom@tdpain.net>
2020-10-28 02:31:30 +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
23bddfd23f
I promise this is the last commit like this 2020-10-26 11:11:55 +00:00
Tom
59f2497b48
I am stupid 2020-10-26 11:11:55 +00:00
Tom
bc3b69ccca
Fix gosec and tests 2020-10-26 11:11:54 +00:00
Tom
9269513917
📝 Update docs/comments for limiter middleware 2020-10-26 11:11:54 +00:00
Tom
5c9f8a52fd
📦 Implement storage method switching 2020-10-26 11:11:54 +00:00
Tom
87419a26d7
Update limiter middleware tests 2020-10-26 11:11:53 +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
8500fd1289
I promise this is the last commit like this 2020-10-08 21:16:10 +01:00
Tom
3043033f0a
I am stupid 2020-10-08 21:14:04 +01:00
Tom
fc11562191
Fix gosec and tests 2020-10-08 21:12:27 +01:00