-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: pass headers when connecting sockets #1575
Changes from 7 commits
cf235db
bae4782
d5dc6c7
b50fd60
96f68c9
b599372
7ad1706
646d1bf
d1931bf
8272012
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,6 +100,8 @@ const useChatSession = () => { | |
|
||
const socket = io(uri, { | ||
path, | ||
withCredentials: true, | ||
transports: ['websocket'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change works for our use-case, but I believe adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For instance the gcp load balancer only works with this. We can make it configurable I think. |
||
extraHeaders: { | ||
Authorization: accessToken || '', | ||
'X-Chainlit-Client-Type': client.type, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love finally seeing this! :)
We should document that on a server users need to configure the origin.