1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-22 23:43:39 +00:00

51 Commits

Author SHA1 Message Date
Bhurinat Wangsutthitham
0e08bb4fe7
🐛 session should not regenerate the ID in case Get() returned nil (#1493)
* fix: session should not regenerate the ID in case Get() returned nil

* fix: prevent falsy unit-tests

* docs: improve wordings on tests
2021-08-23 08:32:14 +02:00
thinklucrative
9a7b08ee23
Update README.md (#1472)
Typo:
var ConfigDefault = Config{
	KeyLookUp:    "cookie:session_id",
}

should be:
var ConfigDefault = Config{
	KeyLookup:    "cookie:session_id",
}
2021-08-05 20:14:32 +02:00
Spedoske
cd802dfead
Fix: copy the data in buffer instead of using original data. (#1425) 2021-07-11 12:35:02 +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
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
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
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
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
SianLoong
c71da35ddb
🐛 fix: even error we gonna to unlock it, else it will went deadlock (#1248) 2021-03-30 23:40:09 +02:00
RW
b1b490645e
Fix session middleware (#1235)
encoding/gob for session middleware
2021-03-26 11:24:55 +01:00
iRedMail
7537390be0
Add a TODO item to remind implementing a breaking change in fiber v3. 2021-03-20 13:36:22 +08:00
iRedMail
e2fd329f1e
Fix incorrect comment in middleware/session/config.go 2021-03-20 12:55:39 +08:00
tianjipeng
59b12fbcb2
fix: lookup cookie in response header (#1191) 2021-03-01 17:25:36 +01:00
RW
7d51885384
📚 fix wrong session code example (#1170)
📚 fix wrong session code example
2021-02-16 14:50:17 +01:00
hi019
494474aebd
Merge branch 'master' into master 2020-12-13 22:08:51 -05:00
Fenny
6dcbdf4e85 🧹 remove invalid config 2020-12-09 01:29:42 +01:00
Fenny
0fe30ac722 🌀 introduce RegisterType 2020-12-06 16:37:08 +01:00
Fenny
19bee02563 🩹 draft for #1051 2020-12-03 11:56:32 +01:00
Fenny
e28c886d73 🩹 fix internal memory storage 2020-12-03 11:14:33 +01:00
Fenny
cd029a67a7 🩹 fix #1050 2020-12-03 11:07:15 +01:00
nupamore
65a57d194a fix: set cookie order 2020-12-02 15:34:16 +09:00
Fenny
7be78406cb 🔐 use uuid v4 in session 2020-11-30 14:31:10 +01:00
Fenny
d56ca11be8 🩹 fix empty CookieName in session
See https://github.com/gofiber/fiber/issues/1040
2020-11-27 16:36:22 +01:00
Fenny
45d64da9fa 🍿 move mutex 2020-11-26 22:33:35 +01:00
Fenny
a0442be8b6 ✏ move mutex 2020-11-26 22:16:49 +01:00
Fenny
450bf14c3d 🩹 fix test 2020-11-26 16:38:35 +01:00
Fenny
418d82e4d1 🩹 fix test 2020-11-26 16:36:26 +01:00
Fenny
2b76fd6648 🩹 fix test 2020-11-26 15:27:05 +01:00
Fenny
3107a59469 💡 try rwlock 2020-11-26 13:54:55 +01:00
Fenny
52292babba 🩹 fix race condition 2020-11-26 12:19:05 +01:00
Fenny
e1078f8716 🩹 fix #1030 2020-11-26 12:05:43 +01:00
Fenny
711911aeea 🩹 fix #1033 2020-11-25 13:10:01 +01:00
Fenny
367fed6ebe 🩹 fix session mw 2020-11-23 08:44:34 +01:00
Fenny
a468af7762 🩹 fix mutex lock 2020-11-23 07:44:06 +01:00
Fenny
6ded637712 🩹 update store logic 2020-11-18 09:02:42 +01:00
hi019
e828c17554 Standardize MW docs 2020-11-17 12:12:49 -05:00
Fenny
e44da45bff 🩹 fix session test
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-11-17 08:15:22 +01:00
Fenny
de912755f7 📦 update session 2020-11-16 14:22:44 +01:00
Fenny
581cac04bc ✏ update session readme 2020-11-14 03:14:06 +01:00
Fenny
27baab0ea0 🧨 introduce destroy 2020-11-13 18:30:14 +01:00
hi019
37dd02e4cb Comment out TODO test 2020-11-13 00:06:27 -05:00
hi019
edd9890518 Add session tests 2020-11-12 23:59:56 -05:00
Fenny
e25206458d 🧪 add session test 2020-11-12 19:11:50 +01:00
Fenny
ef35d00a79 🦺 simplify session config 2020-11-11 23:51:32 +01:00
Fenny
2864657c76 ✏ update readme 2020-11-11 19:24:43 +01:00
Fenny
2cafd486ef ✒ update session logic 2020-11-11 19:22:40 +01:00
Fenny
75e3f13de1 ✏ update config 2020-11-11 18:49:07 +01:00
Fenny
d8623ef53c ✏ fix comment 2020-11-11 18:45:04 +01:00
Fenny
1bd7b1b15b ✏ fix typo 2020-11-11 16:41:26 +01:00
Fenny
687717f113 🛠 separate config 2020-11-11 14:03:16 +01:00