fix(formModal): encode the accessToken parameter in the chatEndpoint URL to handle special characters correctly
The accessToken parameter in the chatEndpoint URL is now encoded using the encodeURIComponent function to handle special characters correctly. This ensures that the accessToken is properly passed to the chat endpoint without causing any issues.
This commit is contained in:
parent
9d7deccc53
commit
418bddd322
1 changed files with 1 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ export default function FormModal({
|
|||
|
||||
return `${
|
||||
isDevelopment ? "ws" : webSocketProtocol
|
||||
}://${host}${chatEndpoint}?token=${accessToken}`;
|
||||
}://${host}${chatEndpoint}?token=${encodeURIComponent(accessToken!)}`;
|
||||
}
|
||||
|
||||
function handleWsMessage(data: any) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue