-
-
Notifications
You must be signed in to change notification settings - Fork 387
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.16
What platform is your computer?
Darwin 24.6.0 arm64 arm
What environment are you using
bun 1.3.1
Are you using dynamic mode?
no
What steps can reproduce the bug?
new Elysia()
.guard({
cookie: t.Cookie({
value: t.Optional(
t.Object({
a: t.String(),
b: t.String(),
}),
),
}),
})
.get("/cookie", ({ cookie: { value } }) => value.value)
.post("/cookie", ({ cookie: { value } }) => {
value.value = { a: "1", b: "2" };
})
.listen(3001);
Send 2 requests:
POST http://localhost:3001/cookie
then
GET http://localhost:3001/cookie
What is the expected behavior?
I expect to receive set-cookie header in POST response only.
What do you see instead?
Instead, i also receive set-cookie header for GET request. In reality, i was receiving set-cookie header in all other requests.
Additional information
No response
Have you try removing the node_modules and bun.lockb and try again yet?
yes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working