Commit Graph

610 Commits (543e8bb7ea36ff97c5f5ab6b64a58f594c1228d1)

Author SHA1 Message Date
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
Jason McNeil 6272d759eb
🚀 [Feature]: middleware/csrf custom extractor (#2052)
* feat(middleware/csrf): allow custom Extractor

* test: update Test_CSRF_From_Custom

* docs: add comma

* docs: update KeyLookup docs
2022-08-28 18:57:47 +02:00
Amir Hossein ffb2d4cb1a
fix unhandled error in cache package tests (#2049)
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name
2022-08-26 14:10:46 +02:00
Trim21 c964fda009
v3(tests): use testify for assertion (#2036)
* replace

* write

* rewrite more

* rewrite

* rewrite

* fix

* rewrite
2022-08-22 07:57:10 +02:00
Trim21 b161f805c2
v3(enhancement): remove `utils.Trim*` (#2030)
stdlib functions have same performance in go1.19
2022-08-20 13:52:09 +08:00
Jinquan Wang 32d311cd59
🐛 monitor middleware - fix ignore custom settings (#2024)
* 🐛 fix: ignore custom settings

* 🐛 fix: ignore custom settings

*  chore: add tests for config default
2022-08-19 15:09:16 +02:00
Muhammed Efe Çetin 4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta 2022-08-19 14:33:31 +03:00
M. Efe Çetin 6669ec4486
📝 docs: gofmt & add missing copyright texts (#2013) 2022-08-15 20:25:26 +02:00
Jinquan Wang e8a2ba363c
🐛 bug: fix proxy overwrote the wrong scheme (#2004)
* 🐛 bug: fix proxy overwrote the wrong scheme

*  fix: fix io not exist in go1.14
2022-08-09 16:14:41 +02:00
Muhammed Efe Çetin f3067c14b3
🔥 v3: remove monitor middleware from core to reduce deps 2022-08-08 11:22:28 +03:00
M. Efe Çetin eacde70294
v3 (feature): initial support for binding (#1981)
*  v3 (feature): initial support for binding

*  v3 (feature): initial support for binding #1981
use pointer/references instead of copies

*  v3 (feature): initial support for binding
embed bind into the ctx

*  v3 (feature): initial support for binding
- add URI binder.

*  v3 (feature): initial support for binding
- add response header binder.

*  v3 (feature): initial support for binding
- add response header binder.

*  v3 (feature): initial support for binding
- add cookie binder.

*  v3 (feature): initial support for binding
- custom binder support for body binding.
- test case for custom binder.

*  v3 (feature): initial support for binding
- add map[string][]string & map[string]string support for binders.

*  v3 (feature): initial support for binding
- fix Test_Bind_Header_Map

*  v3 (feature): initial support for binding
- Functional Should/Must

*  v3 (feature): initial support for binding
- custom struct validator support.

*  v3 (feature): initial support for binding
- README for binding.
- Docs for binding methods.

*  v3 (feature): initial support for binding
- Bind() -> BindVars(), Binding() -> Bind()

*  v3 (feature): initial support for binding
- fix doc problems

*  v3 (feature): initial support for binding
- fix doc problems

Co-authored-by: wernerr <rene@gofiber.io>
2022-08-08 09:16:08 +02:00
Muhammed Efe Çetin 738e710766
♻️ v3 (enhancement): use fs.FS as Filesystem type of favicon middleware 2022-08-07 19:06:05 +03:00
M. Efe Çetin 4103f9463d
feature: customizable colors (#1977)
*  feature: customizable colors

*  feature: customizable colors

*  feature: customizable colors
2022-08-01 08:24:37 +02:00
RW ff1e0109a3
Closes #1931 "🤗 How to get path param before a custom verb?" (#1983)
* Add possibility for parameters before custom verb
FIX for "🤗 How to get path param before a custom verb? #1931"

* try to stabilize the tests
2022-07-27 08:37:03 +02:00
M. Efe Çetin a458bd344c
v3 (feature): convert fiber.Ctx type to interface (#1928)
*  v3: convert fiber.Ctx type to interface

* update ctx methods

* add new methods to customize ctx, fix some problems

* update comments.

* fix something
2022-07-13 07:48:29 +02:00
Majid Taheri(I love optimization) 744e4da3ef
add some parameters to config for supporting #1936 (#1956)
* add some parameters to config for supporting #1936

* remove go:embed

* apply code review  - 1956#issuecomment-1169811117

* lint

Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-07-05 13:34:32 +02:00
marcelogamba e58ad6b69a
TagLatency doesn't have consistence format between default and custom format (#1943)
Co-authored-by: Marcelo Gamba <gamba@itstransdata.com>
2022-07-04 09:14:57 +02:00
John Li 41d31a0190
fix middleware/session update cookie. (#1960) 2022-07-02 13:02:41 +02:00
Muhammed Efe Çetin a2c71e548e
v3: include adopter, helmet, keyauth, redirect, rewrite middlewares into the codebase (https://github.com/gofiber/fiber/issues/1828) 2022-06-21 17:36:59 +03:00