3545 Commits

Author SHA1 Message Date
Iliya
5c1e8a9cff
📚 Docs: fix bad documentation on queries function (#2522) 2023-06-27 17:20:50 +02:00
Ruan Heyns
f68ec0dfbb
Update ctx.md: Add a warning on security implications when using X-Forwarded-For improperly (#2520)
Update ctx.md

Add a warning on security implications when using X-Forwarded-For improperly
2023-06-26 10:24:50 +02:00
Jiun Lee
fefc533834
🚀 Add Logger interface and fiberlog (#2499)
* add log for fiber

* replace log in fiber

* add Log use to adapt for log libraries

* Update app.go

Co-authored-by: Tomás Warynyca <41587659+tomaswarynyca@users.noreply.github.com>

* wip: add log docs

* add WithLogger use to print key and value

* remove CtxLogger and add WithContext use to bind Context

* fix errcheck

* fix errcheck

* update log.md

---------

Co-authored-by: Tomás Warynyca <41587659+tomaswarynyca@users.noreply.github.com>
2023-06-26 08:16:57 +02:00
Moein Halvaei
5967d36bc0
✏️ Fix typo (#2518)
* Fix: typo in client.go

* Fix: typo in ctx.go

* Fix: typo in path.go

* Fix: typo in router.go

* Fix: typo in adaptor.go
2023-06-23 16:15:38 +02:00
W. Xiaoyun
040aac94c6
✏️ Fix: typo in ctx.md (#2516)
Fix: typo in ctx.md
2023-06-23 11:44:52 +02:00
Moein Halvaei
85bd155bee
Fix comment in client.go (#2514) 2023-06-23 11:44:29 +02:00
RW
1603a148fe
Update logger.md 2023-06-22 13:21:14 +02:00
RW
b308b2b7a6
Update logger.md
correct spacings
2023-06-22 13:07:33 +02:00
cmd777
1b060cb150
🩹 Fix: default logger color behaviour (#2513)
* Fix logger colors

* Fix tests
Basically add ˙enableColors: true˙ back to default config
2023-06-22 13:06:37 +02:00
dependabot[bot]
a312a17402
Bump github.com/valyala/fasthttp from 1.47.0 to 1.48.0 (#2511)
* Bump github.com/valyala/fasthttp from 1.47.0 to 1.48.0

Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.47.0 to 1.48.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.47.0...v1.48.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>

* repair test setup for this change
"Request timeout settings for the same domain name are reused #1558" https://github.com/valyala/fasthttp/pull/1558

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: René Werner <rene@gofiber.io>
2023-06-20 18:53:10 +02:00
Juan Calderon-Perez
78f4510b28
Disable caching when running govulncheck (#2503)
* Migrate to golang official govulncheck action

* Remove unsupported go version from govulncheck

* Update vulncheck.yml

* Update vulncheck.yml

* Update template to disable caching

* Run checkout before setup-go
2023-06-19 13:33:18 +02:00
RW
2eaeb0f3f7
Update hooks.md
correct docs syntax error
2023-06-19 13:24:41 +02:00
SamanDev
ed95fa8c7e
🔥 Feature: add ability to print custom message on startup (#2491)
* feat: add a variadic parameter on OnListenHandler

* feat: accept a variadic ListenData in startupProcess parameters

* feat: add startupProcess variadic ListenData to function

* refactor: use runOnListenHooks instead of startupProcess for run onListenHooks

* refactor: remove variadic to make codes straightforward

* fix: add listen data to runOnListenHooks

* test: add listenData parameter to OnListen tests

* docs: update OnListen docs

* fix: remove unused codes

* docs: add tabs to onListen hook example

* docs: add if statement to docs example

* docs: replace fmt with log

* docs: fix return value of example

* docs: make 0.0.0.0 string a constant

* fix: change type of TLS from string to bool

* fix: return bool instead of a string

* docs: update example with new TLS type

* fix: change name tls to isTls to prevent shadowing tls variable

* style: make syntax of onListen example shorter

* refactor: remove unused no-lint comment

* refactor: change isTls to isTLS

* fix: add nolint for isTLS bool param

* Update listen.go

---------

Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
2023-06-19 13:11:22 +02:00
我的名字叫浩仔
3dc9e1df80
🐛 bug: fix docs api fiber custom config (#2510)
fix: docs api fiber custom config

Co-authored-by: haoc <haoc@opera.com>
2023-06-19 12:22:55 +02:00
RW
9bcdb560dc
Update ctx.md v2.47.0 2023-06-19 10:49:25 +02:00
RW
204b01aeb2
Update ctx.md 2023-06-19 10:47:45 +02:00
RW
35ea74a317
Update app.go
prepare release v2.47.0
2023-06-19 10:44:23 +02:00
RW
fa5935b7e9
Update ctx.md
reformat queries docu
2023-06-19 10:43:15 +02:00
RW
f86423d625
Update ctx.md
reformat ctx.Queries() example
2023-06-19 10:41:53 +02:00
dependabot[bot]
f4a9cb5023
Bump golang.org/x/sys from 0.8.0 to 0.9.0 (#2508)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/sys/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  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>
2023-06-13 20:03:22 +03:00
René Werner
719a5a2a8f repair test workflow 2023-06-12 07:59:59 +02:00
Iliya
d87065f5f2
🚀 FEATURE: add queries function (#2475)
* 🚀 FEATURE: add queries method

* 📚 DOCS: add documents for queries method.

* 🩹 Fix: fix wrap error returned from Queries function

* 🚨 tests: add url encoded tests

* 🔥 feature: add url encoded support for queries

* 🩹 Fix: fix wrap error returned from Queries function

* ♻️ Refactor: change error message of url.QueryUnescape

* ♻️ Refactor: refactor of mapping key and value queries

* 🚨 Test: Validate to fail parse queries

* 🚨 Test: Add benchmark test for Queries

* 🩹 Fix: remove parsing for encoded urls

* ♻️ Refactor: change string function to c.app.getString fucntion

Co-authored-by: cmd777 <83428931+cmd777@users.noreply.github.com>

* ♻️ Refactor: change name of benchamark function ctx queries

Co-authored-by: leonklingele <git@leonklingele.de>

* ♻️ Refactor: remove empty lines

Co-authored-by: leonklingele <git@leonklingele.de>

* Revert "♻️ Refactor: change string function to c.app.getString fucntion"

This reverts commit 28febf9e602bb13f0761169c26f264e4687da660.

* 📚 Docs: add documents for queries method

* 🚨 Tests: add more tests for queries function

* ♻️ Refactor: change string function to c.app.getString function

* 🚨 Tests: add more test for queries function

* 📚 Docs: add more documents to queries function

---------

Co-authored-by: cmd777 <83428931+cmd777@users.noreply.github.com>
Co-authored-by: leonklingele <git@leonklingele.de>
2023-06-12 07:51:57 +02:00
M. Efe Çetin
f5d2abb948
📝 docs: update version of html template (#2505) 2023-06-10 17:16:11 +03:00
M. Efe Çetin
d4938dad6c
🐛 bug: fix onListen hooks when they are used with prefork mode (#2504)
* 🐛 bug: fix onListen hooks when they are used with prefork mode

🐛 bug: fix onListen hooks when they are used with prefork mode

* 🐛 bug: fix onListen hooks when they are used with prefork mode
2023-06-09 22:42:50 +02:00
René Werner
9effdf829a disable golang test cache 2023-06-09 21:14:32 +02:00
RW
0822f2e322
Revert "Migrate to Golang official govulncheck action" (#2502)
Revert "Migrate to Golang official govulncheck action (#2501)"

This reverts commit b66bcd975aa6e9b302c726a4a5e6025305408949.
2023-06-09 13:34:29 +02:00
Juan Calderon-Perez
b66bcd975a
Migrate to Golang official govulncheck action (#2501)
* Migrate to golang official govulncheck action

* Remove unsupported go version from govulncheck

* Update vulncheck.yml
2023-06-09 09:43:33 +02:00
Jason McNeil
0f5ffed3cc
🐛fix: update getOffer to consider quality and specificity (#2486)
* feat: getOffer consider q value and specificity

* fix: ignore q=0

* fix: float

* test: client-prefered order and q=0 not acceptable

* fix: always use my insertion sort.

* fix: sort.SliceStable if > 20

* fix: zero allocations

* perf: optimize the sort

* chore: fix lint issue

* fix: consider order

* chore: fix test func name

* chore: fix helper test func name

* chore: revert fix

* perf: use fasthttp.ParseUfloat

* test: GetOffer and SortAcceptedTypes

* chore: remote nil check

* test: sortAcceptedTypes

* fix: use utils.UnsafeBytes

* docs: update docs for fiber PR #2486

* docs: update docs for fiber PR #2486

* test: add test from docs

* fix: yaml
2023-06-07 17:51:45 +02:00
Amir Hossein
d91ea9e01e
📚 translate README_fa.md (#2496)
* translate README_fa.md (#1)

* add "Using Trusted Proxy" section under the "show more code examples"
2023-06-07 18:21:36 +03:00
Anzhi
06ef450a8a
🚀 Add DisableColors to set the default output format (#2493)
Add DisableColor for default logger format
2023-06-05 13:20:45 +02:00
Chris Hurst
c955d76f5d
🐛 bug: fix middleware naming and returned values of group methods (#2477)
* Bug fix: route names not updating

* fixed lint error

* updated tests with renaming edge case

* fix group naming partially

* add todo

* fix todo

* fix todo

---------

Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2023-06-05 13:00:51 +02:00
cmd777
4c12938309
♻️ Refactor: use c.app.getString instead of string(...) (#2489)
use c.app.getString instead of string(...)
2023-06-01 10:47:07 +02:00
Oleg
b9e93ccd4a
Fix Sliding Window limiter when SkipSuccessfulRequests/SkipFailedRequests is used. (#2484)
* Fix Sliding Window limiter when SkipSuccessfulRequests/SkipFailedRequests is used.

* Add tests.

* Fix linter.

---------

Co-authored-by: Oleg Bakumenko <Bakumenko.Oleg@wb.ru>
2023-06-01 08:00:31 +02:00
Lucas Lemos
5d53263572
🐛 fix: treat case for possible timer memory leak (#2488) 2023-05-31 08:01:13 +02:00
Satont
369494cf25
fix: reset terminal colors after print routes (#2481)
* fix: reset terminal colors after print routes

* Remove unnecessary `\t` for routes
2023-05-28 09:34:14 +02:00
dependabot[bot]
9217820f23
Bump github.com/mattn/go-isatty from 0.0.18 to 0.0.19 (#2474)
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.18 to 0.0.19.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.18...v0.0.19)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 18:49:28 +03:00
Alexander
5a84fa0e8e
📒 Correcting a syntax error in the README (#2473)
* Update README.md

* 📝 docs: fix typo in some readme
2023-05-20 11:09:24 +02:00
RW
1207d5055b
Update app.go
prepare release 2.46.0
v2.46.0
2023-05-19 12:22:16 +02:00
leonklingele
fe487934f9
utils: add Go 1.20+ way of converting byte slice to string (#2468)
Ref. d2f97fc426/b2s_old.go.
Ref. d2f97fc426/b2s_new.go.
2023-05-19 11:07:20 +02:00
RW
182f9f0970
🚀 Speedup and cleanup "path" testcases and benchmarks (#2465) 2023-05-17 15:45:38 +02:00
RW
df87a82d5a
🐛 Fix mount route positioning (#2463)
* 🐛 [Bug-fix]: Wrong handlers execution order in some mount cases #2460

* 🐛 [Bug-fix]: Wrong handlers execution order in some mount cases #2460

* 🐛 [Bug-fix]: Wrong handlers execution order in some mount cases #2460

* [Bug-fix]: Wrong handlers execution order in some mount cases #2460

* [Bug-fix]: Wrong handlers execution order in some mount cases #2460
2023-05-17 10:51:05 +02:00
leonklingele
c56b4e66a0
middleware/adaptor: allow to convert fiber.Ctx to (net/http).Request (#2461) 2023-05-15 13:04:58 +02:00
leonklingele
eced39c47e
utils: add Go 1.20+ way of converting string to byte slice (#2462)
* utils: add Go 1.20+ way of converting string to byte slice

Ref. d2f97fc426/s2b_old.go.
Ref. d2f97fc426/s2b_new.go.

* utils: fix golangci-lint apparently running with Go < 1.20

See https://github.com/gofiber/fiber/actions/runs/4968641325/jobs/8891360463?pr=2462.
2023-05-15 07:21:16 +02:00
Алексей Ковригин
77c1b4868a
📝 docs: update README_ru.md (#2456)
📝 docs: update README_ru.md

Translated 3 blocks: Limitations, Awesome list, License
2023-05-10 23:51:56 +03:00
M. Efe Çetin
c7c37d9b50
♻️ refactor: merge some external middlewares to core (#2453)
* ♻️ refactor: merge adaptor, helmet, keyauth, redirect, rewrite middlewares to core

* fix linting issues

* fix linting issues

* fix linting issues

* update
2023-05-10 08:01:49 +02:00
RW
9cc10e942a
Update benchmark.yml 2023-05-09 09:01:56 +02:00
RW
6770e45590
Update app.go
prepare release v2.45.0
v2.45.0
2023-05-07 16:49:42 +02:00
dependabot[bot]
9abb24597f
Bump golang.org/x/sys from 0.7.0 to 0.8.0 (#2449)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/sys/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  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>
2023-05-05 16:24:44 +03:00
dependabot[bot]
3ed1c8dd3e
Bump github.com/valyala/fasthttp from 1.46.0 to 1.47.0 (#2445)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.46.0 to 1.47.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.46.0...v1.47.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>
2023-05-03 19:26:46 +03:00
bcd
3c3f12b76c
[Feature]: Add filesystem config contentTypeCharset support (#2438)
* Update filesystem.go

* Update filesystem_test.go

* Update filesystem.md

* fmt
2023-05-02 08:40:20 +02:00