fix to allow running the backend on port 443 without https (wss protocol is required even without an SSL certificate)
This commit is contained in:
parent
e922978f27
commit
97bf39143d
1 changed files with 1 additions and 1 deletions
|
|
@ -160,7 +160,7 @@ export default function FormModal({
|
|||
}
|
||||
|
||||
function getWebSocketUrl(chatId, isDevelopment = false) {
|
||||
const isSecureProtocol = window.location.protocol === "https:";
|
||||
const isSecureProtocol = window.location.protocol === "https:" || window.location.port === "443";
|
||||
const webSocketProtocol = isSecureProtocol ? "wss" : "ws";
|
||||
const host = isDevelopment ? "localhost:7860" : window.location.host;
|
||||
const chatEndpoint = `/api/v1/chat/${chatId}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue