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

Possible to set custom headers in the response? #103

Open
mgm1313 opened this issue Sep 22, 2024 · 2 comments
Open

Possible to set custom headers in the response? #103

mgm1313 opened this issue Sep 22, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@mgm1313
Copy link

mgm1313 commented Sep 22, 2024

Is it currently possible to set a custom header in the response, for example, Set-Cookie?

@elmerbulthuis
Copy link
Member

Custom headers are not directly supported, if you need this then add the header to the specification, or solve it with middelware.

What to you need Set-Cookie for?

@elmerbulthuis elmerbulthuis self-assigned this Oct 3, 2024
@elmerbulthuis elmerbulthuis added the question Further information is requested label Oct 3, 2024
@mgm1313
Copy link
Author

mgm1313 commented Oct 3, 2024

The question was inspired by the way Medusa implements auth for their ecommerce API. They support cookie-based auth by sending a request to /auth/session, which returns a Set-Cookie header after successful authentication. However, there is no immediate use case on our side since, for the time being, we only support JWT tokens and API tokens.

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

No branches or pull requests

2 participants