leonklingele
0b5a7d0425
🚀 Feature: Add idempotency middleware ( #2253 )
...
* middleware: add idempotency middleware
* middleware/idempotency: use fiber.Storage instead of custom storage
* middleware/idempotency: only allocate data if really required
* middleware/idempotency: marshal response using msgp
* middleware/idempotency: add msgp tests
* middleware/idempotency: do not export response
* middleware/idempotency: disable msgp's -io option to disable generating unused methods
* middleware/idempotency: switch to time.Duration based app.Test
* middleware/idempotency: only create closure once
* middleware/idempotency: add benchmarks
* middleware/idempotency: optimize strings.ToLower when making comparison
The real "strings.ToLower" still needs to be used when storing the data.
* middleware/idempotency: safe-copy body
2023-01-06 08:46:17 +01:00
TwiN
ad5250a6ff
📝 docs(middleware): fix alignment in limiter example ( #2283 )
...
docs(middleware): Fix indentation in limiter example
Noticed a small formatting issue while going through the docs.
2023-01-05 12:32:28 +08:00
leonklingele
6334f2c9ff
🚀 v3 Feature: Make app.Test accept a time.Duration timeout ( #2269 )
...
app: make app.Test accept a time.Duration timeout
Cases found by running semgrep with an empty .semgrepignore file
semgrep --lang=go -e '$O.Test($X, $Y)'
2022-12-12 20:39:52 +01:00
leonklingele
fd1a29ea79
🚀 Feature: Generate msgp tests ( #2263 )
...
* middleware: also generate msgp tests
* middleware/session: drop unused go:generate directive
* middleware: disable msgp's -io option to not generate unused methods
2022-12-11 17:40:07 +01:00
kinggo
efeea7a4b5
optimize: latency use lowest time unit in logger middleware ( #2261 )
2022-12-10 21:56:43 +01:00
leonklingele
802defa5ff
v3 (chore): cleanup ( #2255 )
...
* middleware: switch to new Ctx interface in documentation
* all: use any instead of interface{}
2022-12-03 15:39:57 +03:00
kinggo
075dfc5a8a
optimize: set byteSent log to 0 when use SetBodyStreamWriter ( #2239 )
2022-12-01 09:19:26 +01:00
leonklingele
17dfcc756b
middleware/requestid: mention that the default UUID generator exposes the number of requests made to the server ( #2241 )
2022-12-01 09:11:14 +01:00
Xaver Fischer
6d798dbda9
📝 middleware/filesystem does not handle url encoded values on it's own ( #2247 )
...
* 📝 middleware/filesystem does not handle url encoded values
* Update README.md
add newline after first warning
Co-authored-by: Xaver Fischer <xaverfischer@mail.de>
2022-12-01 08:53:40 +01:00
Muhammed Efe Çetin
c62dd16e8d
Merge remote-tracking branch 'origin/master' into v3-beta
2022-11-27 20:34:48 +03:00
RW
e4b3b5c708
Improve interface for custom logger func ( #2225 )
...
* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal
* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal
* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal
* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal
2022-11-18 15:32:56 +01:00
Andy Pan
92ce4aac77
📝 Update middleware/logger docs ( #2224 )
...
* 📝 Update middleware/logger docs
Update #2219
* Update middleware/logger/README.md
Co-authored-by: RW <rene@gofiber.io>
2022-11-18 14:29:53 +01:00
René Werner
3d39b82aad
logger: adjustment for the new Done function - use nil instead of empty func
2022-11-18 13:23:57 +01:00
skyenought
e8f8cb647b
✨ Add customTags in logger middleware Config ( #2188 )
...
* ✨ Add customTags in logger middleware Config
* improve tags with parameter
* improve logger performance
* improve logger performance
* improve logger performance
* improve logger performance
Co-authored-by: René Werner <rene@gofiber.io>
2022-11-18 13:10:43 +01:00
Andy Pan
3157fb5f1c
✨ Add callback function for middleware/logger ( #2219 )
...
* ✨ Add callback function for middleware/logger
* Refine test code
2022-11-15 12:14:32 +01:00
Glenn Lewis
13247206ab
Add URL prefix to pprof middleware ( #2194 )
...
* Add URL prefix to pprof middleware
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
* Minor tweak
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
2022-11-09 07:59:33 +01:00
Andy Pan
24a6170323
♻️ Leverage runtime/debug to print the full stack trace info ( #2183 )
2022-10-31 15:12:43 +01:00
Kris Carr
f26d9b1d4e
v3 (deps): update to use gofiber/utils/v2 ( #2184 )
2022-10-31 16:44:53 +03:00
Muhammed Efe Çetin
543e8bb7ea
v3: fix tests
2022-10-28 18:19:02 +03:00
Muhammed Efe Çetin
9428befb9c
Merge remote-tracking branch 'origin/master' into v3-beta
2022-10-28 17:26:17 +03:00
M. Efe Çetin
691d2e6ad5
🗑️ deprecate: go 1.14 & go 1.15 support deprecation ( #2172 )
...
* 🗑️ deprecate: go 1.14 & go 1.15 support deprecation
https://github.com/valyala/fasthttp/pull/1379
* fix tests
2022-10-26 11:51:50 +02:00
Diego Parisi
eb692727c5
✏️ Fix: comment typo ( #2173 )
...
Just a typo
I think there's a typo "unmashal" for "unmarshal"
2022-10-25 19:05:57 +03:00
marcmartin13
4d584c9c9b
📝 Cache readme and docs update ( #2169 )
...
* Update README.md
* update no-store request directive
added cache status unreachable
* Update cache.go
2022-10-25 07:52:28 +02:00
marcmartin13
c187c6a2f5
🚀 [Feature]: Cache-Control: no-cache ( #2159 )
...
* Added noCache field
Check if the request header Cache-Control contains no-cache
* Update cache.go
* Update config.go
* Update cache.go
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
* patch-1
2022-10-21 10:28:31 +02:00
kinggo
5fb93fdff6
🐛 fix: multi-byte AppName displays confusion ( #2148 )
...
fix: solve wrong print width
2022-10-21 08:30:56 +02:00
RW
ce2d087394
Improve memory storage ( #2162 )
...
* improve memory storage code and performance
* improve memory storage code and performance
* improve memory storage code and performance
* improve memory storage code and performance
* improve memory storage code and performance
* improve memory storage code and performance
2022-10-19 16:22:42 +02:00
kinggo
2b7a632a19
style: update logger's comment ( #2157 )
2022-10-17 18:42:05 +03:00
kinggo
d275091a2f
🐛 fix: solve data race in middleware/proxy's test ( #2153 )
...
fix: solve data race in middleware/proxy's test
2022-10-17 17:20:41 +02:00
xbt573
a023fc2947
🐛 Fix: Reset d.Data instead of deleting keys in it ( #2156 )
...
🐛 Reset d.Data instead of deleting keys in it
2022-10-17 16:30:34 +02:00
M. Efe Çetin
925d5d03dc
📝 docs: add doc about usage of CSRF and EncryptCookie middlewares. ( #2141 )
2022-10-06 07:54:29 +02:00
Muhammed Efe Çetin
7fb50f11f6
✏️ v3 : replace utils.AssertEqual with require in filesystem mw tests
2022-09-30 18:34:38 +03:00
M. Efe Çetin
668b0c85f8
✨ v3 (enhancement): refactor filesystem middleware with io/fs
( #2027 )
...
* ✨ v3 (feature): refactor filesystem middleware with `io/fs`
* update docs
* attachment support.
* fix
2022-09-29 08:28:52 +02:00
kinggo
8e8ad95079
✨ feat: support to set client in proxy mw ( #2117 )
...
optimize: add WithClient
2022-09-28 14:27:58 +02:00
Fufu
4108d73fe0
✏️ Fix: typos ( #2127 )
...
Fix: typos
2022-09-28 08:55:28 +03:00
Muhammed Efe Çetin
ca6f25a890
➕ v3 (deps): move utils
to
https://github.com/gofiber/utils
2022-09-23 21:19:44 +03:00
M. Efe Çetin
10d6f69a89
✨ v3 (feature): new redirection methods ( #2014 )
...
* ✨ v3 (feature): new redirection methods
* add flash messages
* withinput, parsing flash message
* add tests
* add benchmarks
* gosec issues
* fix tests
* fix tests
* fix performance issues
* fix performance issues
* optimization.
* better names
* fix tests
* Update router.go
* fix
* fix old messaages with flash messages behavior, add new test case with req
* complete some reviews
* add pool for redirection.
* use constant
* update
* ✨ v3 (feature): new redirection methods
* fix tests, optimize cookie parsing (9 allocs -> 1 alloc)
* test case for message includes comma
* cleanup
* optimization.
* some improvements for the redirect feature
* fix Benchmark_Redirect_Route_WithFlashMessages
* some improvements for the redirect feature
* Update redirect.go
* improve message parsing & test case
Co-authored-by: René Werner <rene@gofiber.io>
2022-09-23 08:17:34 +02:00
dayu
d461bf231e
Update README.md ( #2114 )
...
some demo codes missing parenthesis, i added them to make that codes could be copied and run
2022-09-22 12:30:19 +03:00
M. Efe Çetin
305bb072be
🧹 tidy up: fix linter errors for tests ( #2102 )
2022-09-19 08:33:58 +02:00
Hakan Kutluay
7c83e38757
🔥 Update: add timeout context middleware ( #2090 )
...
* 🔥 Feature: add timeoutcontext middleware
* move timeoutconext to timeout package
* remove timeoutcontext readme.md
* replace timeout mware with timeout context mware
* Update README.md
* Update README.md
* update timeout middleware readme
* test curl commands fixed
* rename sample code title on timeout middleware
Co-authored-by: RW <rene@gofiber.io>
2022-09-16 16:03:02 +02:00
M. Efe Çetin
8ec62a64cc
🧹 update: add methods configuration for cache middleware ( #2081 )
...
* 🧹 update: add methods configuration for cache middleware
* 🧹 update: add methods configuration for cache middleware
2022-09-11 13:11:33 +02:00
M. Efe Çetin
281e2f0046
✨ v3 (feature): merge Listen methods & ListenConfig ( #1930 )
...
* ✨ v3: new Start method for app
* ✨ v3: new Start method for app
* ✨ v3: new Start method for app
* ✨ v3: new Start method for app
* ✨ v3: new Start method for app
* ✨ v3: new Start method for app
* fix tests
* improve graceful shutdown
* update
* Start -> Listen
* rename test funcs.
* Add Test_Listen_Graceful_Shutdown test.
* add OnShutdownSuccess
* fix tests
* fix tests
* split listen & listener
* typo
* Add retry logic to tests
* Add retry logic to tests
* Add retry logic to tests
* Add retry logic to tests
Co-authored-by: René Werner <rene@gofiber.io>
2022-09-08 07:57:05 +02:00
M. Efe Çetin
e9db6c70d2
v3: fix logger benchmarks ( #2074 )
...
* v3: fix logger benchmarks
* fix datarace
* fix datarace
* fix datarace
2022-09-06 17:54:39 +02:00
Muhammed Efe Çetin
e3282f6408
♻️ v3 (enhancement): replace c.Hostname()
-> c.Host()
& add c.Hostname()
that returns host without port
2022-09-06 18:43:06 +03:00
Muhammed Efe Çetin
78c6197430
♻️ v3 (enhancement): remove automatic HEAD method creation from Get()
...
ref: https://github.com/gofiber/fiber/issues/2026
2022-09-05 17:41:39 +03:00
M. Efe Çetin
154e4f8201
✨ v3 (feature): refactor logger middleware ( #1979 )
...
* ✨ v3 (feature): refactor logger middleware
- Make middleware extandable for 3rd-party loggers. (https://github.com/gofiber/fiber/issues/1828 )
* ✨ v3 (feature): refactor logger middleware
- Make middleware extandable for 3rd-party loggers. (https://github.com/gofiber/fiber/issues/1828 )
* ✨ v3 (feature): refactor logger middleware
- add example for zerolog.
* ✨ v3 (feature): refactor logger middleware
- fix ToC.
* merge
2022-09-05 13:15:42 +02:00
Muhammed Efe Çetin
319b8ea3a8
Merge remote-tracking branch 'origin/master' into v3-beta
2022-09-03 23:56:45 +03:00
Fufu
87faeda5c1
🐛 Fix: EnvVar middleware parses base64 incorrectly ( #2069 )
...
* Fix: EnvVar middleware parses base64 incorrectly
* Chore: fix typo in README.md
* Chore: standardize and simplify response
2022-09-03 19:03:51 +02:00
RW
ec96d161a0
Fix csrf middleware behavior with header key lookup ( #2063 )
...
* 🐛 [Bug]: Strange CSRF middleware behavior with header KeyLookup configuration #2045
2022-08-30 14:48:31 +02:00
RW
0ebc9113d5
Update README.md
2022-08-30 08:36:17 +02:00
Emre Savcı
d9257c2c1d
🚀 [Feature]: add envvar expose middleware ( #2054 )
...
* add envvar expose middleware
* fix readme remove redundant word
* change hard coded json marshal to app config marshaller
* update readme
* update all lang readme
* change t.setenv to os.setenv as backward compability reason
* change io.readall to ioutil.readall
* Update envvar.go
* remove get method that only used in test
* remove unused method from envvar struct
* remove path variable from config, update readme, add new test case
Co-authored-by: RW <rene@gofiber.io>
2022-08-30 08:30:13 +02:00