1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-24 02:04:12 +00:00

2991 Commits

Author SHA1 Message Date
RW
d777d889bb
Fix cache expired test (#1461)
* Improve/Stabilize the "Test_Cache_Expired" test run
2021-07-30 20:19:18 +02:00
faceair
1e0d4d3b1c
🐛 fix parse gzipped body (#1458) 2021-07-30 08:02:02 +02:00
Vahagn Mkrtchyan
f0ab2a5433
Add option to specify default values for ParamsInt (#1453) 2021-07-26 19:50:56 +02:00
Marcos de Oliveira
30ba99425f
Add ${port} logger variable (#1448)
* Add c.Addr() and c.Port() functions and logger port variable

* Add gofmt suggestion, README.md description and test

* Remove c.Addr() func and use c.fasthttp.RemoteAddr() instead
2021-07-22 17:42:29 +02:00
HugHunter
7cd8219420
Update README.md (#1444)
spotted a small mistake in the docs
2021-07-19 12:51:03 +02:00
Kazumasa Takenaka (Bamboo)
f5338266e3
fix typo (#1442)
paramters -> parameters
avilable  -> available
seperated -> separated
2021-07-17 17:20:14 +02:00
wja513
dd45be693a
cookie: add possibility to disable same site attribute (#1428)
* fix some old browsers cann't set the cookie if it contains SameSite property.

* add "SameSite" attribute constants and test case.

Co-authored-by: wangjiangao <wangjiangao@360.cn>
2021-07-16 20:08:17 +02:00
RW
005471d7ca
prepare release 2.15.0 v2.15.0 2021-07-16 08:45:10 +02:00
Sujit Baniya
8ab5c657c6
🔥 FEATURE: Allow adding App Name to customizing the startup message (#1418)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go

* Add App Name function to pass custom app name

* Remove json tag for function

* Change func to string

* Add test for AppName

Co-authored-by: RW <rene@gofiber.io>
2021-07-16 08:44:11 +02:00
wernerr
c8d0a0c2ae 📚 Correct order of the basic routing example 2021-07-14 08:00:33 +02:00
Spedoske
cd802dfead
Fix: copy the data in buffer instead of using original data. (#1425) 2021-07-11 12:35:02 +02:00
Troy
08b2b71197
Add support for streaming the request body. (#1423)
* update fasthttp

* allow req body streaming

* multipart form streaming

* update fasthttp

* allow req body streaming

* multipart form streaming

* Testing
2021-07-11 11:45:46 +02:00
tuhao1020
a109dc6c68
Schema parser: use full match instead of strings.HasPrefix (#1424)
* #1414 use full match instead of strings.HasPrefix

* update for  nested or recursive structs

* replace strings.Contains with strings.IndexByte
2021-07-11 11:45:15 +02:00
Jefferson Maia
b5cb8549e0
fix: Installation section translation correction (#1432) 2021-07-11 11:42:29 +02:00
RW
ff57431cde
prepare release 2.14.0 v2.14.0 2021-07-01 14:10:54 +02:00
Oleg Roshnivskyy
5ba78cd24a
🔥 Feature: Add TrustedProxies feature (#1397)
* 🔥 Feature: Add TrustedProxies feature

Add TrustedProxies feature to prevent HTTP header spoofing.

* Update ctx.go

* Update app.go

* Update app.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
2021-06-30 08:03:45 +02:00
Spedoske
e082880297
Fix: Session middleware issues (#1407)
* Update session.go

Fix: Session.Regenerate does not set Session.fresh to be true.

* Fix: Session should be regenerated if the session can not be found in the storage
https://github.com/gofiber/fiber/issues/1408

* Add test for session and store in session middleware.

* Clean up code

* Update middleware/session/session.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
2021-06-30 08:01:22 +02:00
alfuhigi
28ba42a6fd
✏️ fix [🔑gosec|passing] icon -> README_*.md (#1405)
* ✏️ fix [🔑 gosec|passing] icon -> README_*.md that not show correctly

* 🚩  drop .PNG, use SVG base64 for Flag
2021-06-25 08:25:38 +02:00
alfuhigi
43876dad8f
🧹 remove duplicate in test (#1404) 2021-06-24 12:29:48 +02:00
tuhao1020
93dc33ad89
add tls config for http client in proxy middleware (#1393)
* add tls config for http client in proxy middleware

* update exmaple and make tls.config also affects to proxy.Balancer

* add Test_Proxy_Forward_WithTlsConfig

* add a variable of type *tls.Config

* add a RWMutex for clientTlsConfig

* remove global tls config

* Update README.md

* Update proxy.go

Co-authored-by: RW <rene@gofiber.io>
2021-06-24 08:13:18 +02:00
Andreas
2703e92c5d
Added decompression cases for Body function (#1402)
* Added decompression cases for Body function

* Fixed signature of Body() function

* Removed regex, added Header.Peek

* Added test case with compression

* Added Benchmark, moved compression names to helpers and made them constants

* Added long brotli as a constant

* Update ctx.go

improve Body function

* Update ctx.go

improve performance

* Fixed formatting

* Update helpers.go

Co-authored-by: RW <rene@gofiber.io>
2021-06-24 07:47:21 +02:00
Joey
843fab720e
📝 update license 2021-06-23 06:28:46 +02:00
Tomás Warynyca
b72297ee66
fix readme zh-CN (#1400) 2021-06-22 12:10:04 -04:00
Wei Lun
41b642fbd3
deprecate feature-policy (#1392) 2021-06-21 08:49:49 +02:00
Javad Rajabzade
7609117cec
Improved some conditions (#1386)
* simplify `u <= (1<<7)-1` to `u < (1 << 7)`

* It's not recommended to use `len` for empty string, we can check with string with ""

* It's not recommended to use `len` for empty string, we can check with string with ""

* It's not recommended to use `len` for empty string, we can check with string with ""

* It's not recommended to use `len` for empty string, we can check with string with ""

* Instead Bool comparison can using simplified bool check if !var = false checking

* Unnecessary use of fmt.Sprintf for value without format

* For check condition two value not required ! method

* nil check may not be enough for slice, better check with len

* function parameters combined

* When the form returns error information, the text content should not start with a capital letter or end with a punctuation mark

* error var invalidPath should have name of the form errFoo, It is recommended that the error variables that are part of an API should be named

* change to condition len(x), it's faster https://github.com/gofiber/fiber/pull/1386#discussion_r652369520

* Update write.go

* Update write_bytes.go

* Update store.go

Co-authored-by: RW <rene@gofiber.io>
2021-06-17 22:03:59 +02:00
RW
1def652e57
prepare release 2.13.0
prepare release 2.13.0
v2.13.0
2021-06-16 19:57:55 +02:00
George Goranov
1852224001
Expose internal errors. (#1387) 2021-06-16 10:58:22 +02:00
Sujit Baniya
cb5f2f7eab
🔥 Add Global ViewLayout (#1384)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go
2021-06-14 11:10:49 +02:00
João Victor Santos
c08568e247
🔥 feat: expiration per session (#1363)
* feat(middlewares): expiration per session

* test(middlewares): session with expiration

* docs(middlewares): session

* chore: apply suggestions from code review
2021-06-13 12:39:19 +02:00
Ilya Chukov
89fdbcf036
Improve errors handling (#1381)
* replace `fmt.Errorf` to `errors.New`

* changed once `Sprintf` to `Join`
2021-06-13 11:11:42 +02:00
Wei Lun
bca01cc9cc
🔥 Feature: add cache header to show cache status (#1368)
* add cache header to show cache status

* update default CacheHeader to X-Cache

* add CacheHeader test

* Update cache_test.go

use constants in test

Co-authored-by: RW <rene@gofiber.io>
2021-06-13 10:52:03 +02:00
Javad Rajabzade
6da6678325
Fixed Grammar (#1373)
* Add README_fa.md for persian users

* Add flag IR for fix Error: URI Too Long

* Modfied flag image png to svg

* Modified IR flag url for src

* Fixed grammar
2021-06-09 08:29:44 +02:00
Javad Rajabzade
556df42956
Add README_fa.md for Persian users (#1370)
* Add README_fa.md for persian users

* Add flag IR for fix Error: URI Too Long

* Modfied flag image png to svg

* Modified IR flag url for src
2021-06-08 23:09:20 +02:00
Dio Rovelino
eaf35e9e55
Update Readme ID (#1372) 2021-06-08 23:05:10 +02:00
RW
3698ed6ddd
prepare release 2.12.0 v2.12.0 2021-06-06 09:51:58 +02:00
hi019
a7d9c6816e
Fix session delete when there is one key (#1366)
* Add regression test, attempt solution

* Attempt 2
2021-06-05 20:15:06 +02:00
RW
8e89949381
🚀 Configure proxy.Balancer with custom timeout #1362 (#1364)
* 🚀 new possibility to escape special routing parameters, which gives the possibility to follow the google api design guide https://cloud.google.com/apis/design/custom_methods

* 🚀 new possibility to escape special routing parameters, which gives the possibility to follow the google api design guide https://cloud.google.com/apis/design/custom_methods

* 🚀 Configure proxy.Balancer with custom timeout or client #1362

* 🚀 Configure proxy.Balancer with custom timeout or client #1362
2021-06-04 16:54:03 +02:00
bestgopher
2d6323c197
:fix #1360 (#1361) 2021-06-03 16:02:17 +02:00
Costa
9bbadddbb2
add link to third party middlewares of all readmes (#1358) 2021-06-02 11:29:50 +02:00
RW
b14224e5e4
Prepare release 2.11.0 v2.11.0 2021-06-02 08:08:35 +02:00
Milos Gajdos
951d437470
Update fasthttp version to resolve brotli warnings (#1351)
* Update fasthttp version to resolve brotli warnings

andybalholm/brotli retracted v1.0.1 release due to discovering Go
panics. Unfortunately old version of fasthttp used v1.0.1 as a direct
dependency and given fasthttp is a direct dependence of fiber this
causes legitimate warnings when getting fiber module.
This commit update fasthttp version to v1.25.0 which ships with updated
brotli version.

* Update fasthttp to v1.26.0
2021-06-01 21:03:41 +02:00
Costa
bad3abb8ed
fix comments in proxy middleware (#1355)
fix a little comment wrong in proxy middleware
2021-06-01 08:34:33 +02:00
LeoZhan
9b3662eae0
🔥 Customize the source of session_id (#1159)
* 🔥 Feature: Define KeyLookup configuration (#1110)

* 🔥 Feature: Allow session ID to be written in header (#1110)

* 🔥 Feature: Allow session ID to be obtained from different sources (#1110)

* 📚 Doc: Add Source configuration (#1110)
2021-05-29 02:48:25 +02:00
wernerr
d7ca1efd13 fix error after deleting the stale yaml 2021-05-28 09:40:48 +02:00
Luis
641e7459f8
small comment fix (#1347)
Fix to a comment pointing to wrong endpoint
2021-05-27 20:14:14 +02:00
wernerr
51becc123b Remove stale workflow 2021-05-25 09:03:40 +02:00
Kshitij Patil
8616b41517
🔥 Adding user context (#1341)
* Adding user context

* adding docblock

* correcting comments

* minor change in comment

* Update ctx.go

Co-authored-by: RW <rene@gofiber.io>
2021-05-24 00:46:52 -04:00
João Victor Santos
0de49175c7
feat(middlewares): session keys (#1337)
*  feat(midlewares): session keys

- added a sess.Keys() method who retrive all keys from current session

* docs(middlewares): session
2021-05-23 08:45:33 +02:00
bestgopher
2f05108351
fix pprof redirect path (#1330)
* 📒:fix redirect path

* ️:fix test case

* 📚:use constant instead of number

* 🔥:TrimRight instead of TrimSuffix
2021-05-19 12:47:07 +02:00
RW
67adaeadec
prepare release v2.10.0
prepare release v2.10.0
v2.10.0
2021-05-19 08:49:35 +02:00