Commit Graph

3966 Commits (renanbastos93improve-error-handling-csrf-middle)

Author SHA1 Message Date
Juan Calderon-Perez f5933a6cfd
Merge branch 'main' into renanbastos93improve-error-handling-csrf-middle 2024-10-05 07:05:22 -04:00
Sigmund Xia 夏天睿 85a5fb8cf2
🩹Fix: Adaptor middleware duplicates cookies (#3151)
* 🩹Fix: Adaptor middleware duplicates cookies

* 🩹Fix: add extra cases for Test_HTTPMiddlewareWithCookies

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-10-03 16:19:27 +02:00
miyamo2 44cd700ad5
🩹 Fix: behavior of `DefaultCtx.Fresh` when 'Last-Modified' and 'If-Modified-Since' are equal (#3150)
* fix(ctx): 'if-modified-since' and 'last-modified' are equal, `DefaultCtx.Fresh` now returns true

* accurate benchmark measurements
2024-09-26 08:42:35 +02:00
RW 0c1f5ffde8
build(deps): bump github.com/tinylib/msgp from 1.1.8 to 1.2.1 (#3147) 2024-09-25 17:14:32 +02:00
dependabot[bot] 014f20efd5
build(deps): bump github.com/valyala/fasthttp from 1.55.0 to 1.56.0 (#3146)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.55.0 to 1.56.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.55.0...v1.56.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 16:09:43 +02:00
miyamo2 0caa103a43
chore(middleware/cache): fix typo (#3145) 2024-09-25 08:44:04 +02:00
Oktay Özkan 1169e9ac99
📚 Doc: removed zero width white space from logger docs (#3144)
removed zero width white space from logger docs
2024-09-24 09:40:02 +02:00
nexovec 53199f67b8
Replaced link to russian mozilla docs (#3142) 2024-09-23 18:08:24 +02:00
Juan Calderon-Perez f8c514cb25
v3: Optimize IsFromLocal() performance (#3140)
Optimize IsFromLocal()
2024-09-23 15:16:52 +02:00
Juan Calderon-Perez fbc24e83d6
v3: Fix issue with default logger when creating RequestCtx (#3134)
Use Noop Logger when creating RequestCtx
2024-09-15 19:45:44 +02:00
Juan Calderon-Perez 0ef8d716ee
Bump golangci-lint to v1.61.0 (#3135)
* Bump golangci-lint to v1.61.0

* Fix golangci warnings
2024-09-15 19:28:22 +02:00
dependabot[bot] 37f1a65c4c
build(deps): bump DavidAnson/markdownlint-cli2-action from 16 to 17 (#3128)
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 16 to 17.
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v16...v17)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-09-15 19:05:16 +02:00
Juan Calderon-Perez 5c1a0ce9c7
Merge pull request #3133 from yinheli/bugfix/typos
📚 Doc: Fix typos in client hooks documentation
2024-09-14 11:40:53 -04:00
yinheli 311dc3fb92
📚 Doc: Fix typos in client hooks documentation 2024-09-14 23:36:19 +08:00
Glen Sargent 96891c93d3
📚 Doc: Update recover docs to not use reserved keyword (#3129)
update(docs): avoid using reserved keyword
2024-09-11 20:42:53 +02:00
Vaibhav Gupta 62f66e5968
🩹 Fix (v3): handle un-matched open brackets in the query params (#3126)
* Add logic for handling unmatched square brackets in query params

* Add UTs

* Fix lint: fieldalignment error

* Add UTs
2024-09-09 08:11:47 +02:00
Juan Calderon-Perez 7075406ef3
Merge branch 'main' into renanbastos93improve-error-handling-csrf-middle 2024-09-08 06:34:29 -04:00
Juan Calderon-Perez f668537c02
chore: Bump golangci-lint to v1.60.3 (#3119)
Bump golangci-lint to v1.60.3
2024-09-02 15:38:59 +02:00
AuroraTea 4acdc602ce
📚 Doc: Update example in middleware/cors to v3 (#3116)
* docs: update examples to v3 in middleware/cors

* Update docs/middleware/cors.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-08-31 18:38:43 +03:00
René 9541a88f2a fix template markdown 2024-08-30 17:18:55 +02:00
M. Efe Çetin 4b1ee0b48d
client: fix SetProxyURL functionality (#3109)
* client: fix SetProxyURL functionality

* Update client_test.go

* fix lint error (gofumpt)

---------

Co-authored-by: RW <rene@gofiber.io>
2024-08-29 16:57:01 +02:00
M. Efe Çetin 08d9fda631
enhancement: use msgp for flash message encoding/decoding (#3099)
* enhancement: use msgp for flash message encoding/decoding

* add msgp tests

* improve test coverage

* improve test coverage

* fix linter

* update makefile

* extend go generation process

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
Co-authored-by: René <rene@gofiber.io>
2024-08-29 16:45:16 +02:00
René 0fbb447679 Merge remote-tracking branch 'origin/main' 2024-08-28 09:04:44 +02:00
René 59b290db76 update template.md guide 2024-08-28 09:04:37 +02:00
耗子 062ac3bf7b
🩹 Fix: error check in Form binder (#3110)
fix: error check
2024-08-26 08:29:13 +02:00
RW 260c5e5406
Update faq.md 2024-08-22 08:23:03 +02:00
Juan Calderon-Perez 25e399213c
chore: Add support for go1.23 and golangci-lint v1.60.1 (#3101)
* Bump min go to 1.22, bump golangci-lint to v1.60.1, regenerate all msgp

* Fix golanci-lint issues

* Fix golanci-lint issues
2024-08-14 09:14:04 +02:00
Muhamad Surya Iksanudin e43763311d
v3: Consolidate Logic of Handling the Request Body (#3093)
reduce redundant call
2024-07-27 07:42:54 +02:00
Juan Calderon-Perez 99173cc09f
v3: Add Benchmarks for Rewrite Middleware (#3092)
Add Benchmarks for Rewrite Middleware
2024-07-26 16:55:00 +02:00
Juan Calderon-Perez 0592e01382
v3: Improve Performance of c.Body() by 125% (#3090)
* Improve performance of Body()

* Add unit-test and benchmark for BodyRaw() with Immutable
2024-07-25 08:58:40 +02:00
RW fadedcb5be
Use utils Trim functions instead of the strings/bytes functions (#3087)
* Use utils Trim functions instead of the strings/bytes functions

* rename Test and Benchmark functions with same name
2024-07-24 16:25:35 +02:00
dependabot[bot] e2cd1000ea
build(deps): bump actions/checkout from 3 to 4 (#3083)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-24 08:09:58 +02:00
Lucas Lemos 011c8f8007
feat: Add Max Func to Limiter Middleware (#3070)
* feat: add max calculator to limiter middleware

* docs: update docs including the new parameter

* refactor: add new line before go code in docs

* fix: use crypto/rand instead of math/rand on tests

* test: add new test with zero set as limit

* fix: repeated tests failing when generating random limits

* fix: wrong type of MaxCalculator in docs

* feat: include max calculator in limiter_sliding

* refactor: rename MaxCalculator to MaxFunc

* docs: update docs with MaxFunc parameter

* tests: rename tests and add test for limiter sliding
2024-07-23 23:00:37 +02:00
Juan Calderon-Perez 486304d050
v3: Improve performance of helper functions (#3086)
* Improve performance of helper functions

* Fix issue with PR comments from forks
2024-07-23 21:32:22 +02:00
Juan Calderon-Perez 8c3f81e2b7
v3: Use Named Fields Instead of Positional and Align Structures to Reduce Memory Usage (#3079)
* Use composites for internal structures. Fix alignment of structures across Fiber

* Update struct alignment in test files

* Enable alignment check with govet

* Fix ctx autoformat unit-test

* Revert app Config struct. Add betteralign to Makefile

* Disable comment on alert since it wont work for forks

* Update benchmark.yml

* Update benchmark.yml

* Remove warning from using positional fields

* Update router.go
2024-07-23 08:37:45 +02:00
Bruno f413bfef99
🐛 [Bug]: cache middleware: runtime error: index out of range [0] with length 0 (#3075)
Resolves #3072

Signed-off-by: brunodmartins <bdm2943@icloud.com>
2024-07-23 08:36:41 +02:00
Juan Calderon-Perez a57b3c00c4
🐛 bug: Use Content-Length for bytesReceived and bytesSent tags in Logger Middleware (#3066)
* logger: Use Content-Length header for BytesReceived and BytesSent tags

* Use strconv.AppendInt instead of fasthttp.AppendUint
2024-07-23 08:35:50 +02:00
RW ef073601e3
Update benchmark.yml
We should only fail during a PR, not during a merge
2024-07-22 14:36:21 +02:00
René 8e1470fa4a add manual dependabot trigger workflow 2024-07-22 12:05:10 +02:00
René 22e11558e9 Merge remote-tracking branch 'origin/main' 2024-07-22 12:03:31 +02:00
René ac2ddcf847 add manual dependabot trigger workflow 2024-07-22 12:03:24 +02:00
Juan Calderon-Perez 9c0cb9de13
v3: Refactor Benchmark Results Workflow (#3082)
* Refactor benchmarks workflow

* Use full semver tag

* Add fetch depth
2024-07-22 08:59:38 +02:00
Jason McNeil 0de6a2f394
test(ctx_test): Fix race condition (#3081)
* test(ctx_test): Fix race condition

* chore: Release ctx resource after sending file

* refactor: sendFileBodyReader function

Refactor the `sendFileBodyReader` function to remove the unnecessary `app` parameter. This simplifies the function signature and improves code readability.
2024-07-22 08:50:44 +02:00
Lucas Lemos 9ea76518cc
feat: Add support for RebuildTree (#3074)
* feat: add rebuild tree method

* docs: add newline at the end of app.md

* docs: add an example of dynamic defined routes

* docs: remove tabs from example code on app.md

* Update docs/api/app.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update app.md

* docs: add RebuildTree to what's new documentation

* fix: markdown errors in documentation

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* refactor: add mutex lock to the addRoute function

* refactor: remove mutex lock from addRoute

* refactor: fix mutex deadlock in addRoute

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-07-18 22:08:33 +02:00
kirankumar-grootan 4f1dc49894
feat: Add Startup Probe to Healthcheck Middleware (#3069)
* added startup default probe endpoint

* added test case

* updated docs

* updated test order

* added test case

* fixed go fmt and md lint

* fixed go fmt and md lint

* updated doc as per coderabbitai suggestions

* changed healhtcheck route register to use default const instead of string for test cases

* updated whats new with healthcheck content

* updated whats new doc with coderabbitai sugg

* updated migration guide
2024-07-18 13:54:44 +02:00
Juan Calderon-Perez 091a59472c
v3: Improve performance of Adaptor Middleware (#3078)
* Improve performance of adaptor middleware by over 50%

* Update whats_new documentation

* Remove fasthttp.Request pool

* Update whats_new.md
2024-07-18 13:41:56 +02:00
René 58d07f091d v3: Add support for consistent documentation using markdownlint (#3064) 2024-07-11 16:16:12 +02:00
Juan Calderon-Perez 9463a8f626
v3: Add support for consistent documentation using markdownlint (#3064)
* Add support for consistent documentation using markdownlint

* Only run workflow during changes to markdown files

* Fix more inconsistencies

* Fixes to markdown under .github/

* More fixes

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix typo in limiter docs

* Add missing space before code-block

* Add check for dead-links

* Add write-good

* Remove legacy README files

* Fix glob for skipping .md files

* Use paths-ignore instead

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-07-11 15:21:56 +02:00
renanbastos93 41266f37f2
chore: resolve conflicts 2024-07-08 14:38:47 -03:00
renanbastos93 98bbb40398
wip 2024-07-08 14:30:56 -03:00