Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elysia swagger set cookie is undefined #1034 #184

Open
ehsansafari opened this issue Jan 26, 2025 · 1 comment
Open

Elysia swagger set cookie is undefined #1034 #184

ehsansafari opened this issue Jan 26, 2025 · 1 comment

Comments

@ehsansafari
Copy link

What version of Elysia is running?

1.2.10

What version of elysia-swagger is running?

1.2.0

What platform is your computer?

MINGW64_NT-10.0-22631 3.4.10-87d57229.x86_64 x86_64 unknown

What steps can reproduce the bug?

import { Elysia } from "elysia";
import { swagger } from "@elysiajs/swagger";

const app = new Elysia()
  .use(swagger())
  .get("/hi", ({ cookie: { my_cookie } }) => {
    console.log(my_cookie.value);
    return { message: "hi", my_cookie: my_cookie.value };
  })
  .get("/", () => "Hi Elysia!")
  .listen(3000);

console.log(`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`);

When I set it in Elysia swagger it will be empty.

Image

But when I set in Thunder client or shell http I get the value.

Image

What is the expected behavior?

Get the value of cookies

What do you see instead?

No response

Additional information

cookies undefined

Have you try removing the node_modules and bun.lockb and try again yet?

yes

@ehsansafari
Copy link
Author

Image

issues by scalar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant