@m6d/cortex-angular 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -604,6 +604,8 @@ function createCortexSocket(options) {
|
|
|
604
604
|
let closed = false;
|
|
605
605
|
function connect() {
|
|
606
606
|
const wsUrlOption = typeof options.wsUrl === "function" ? options.wsUrl() : options.wsUrl;
|
|
607
|
+
if (wsUrlOption === false)
|
|
608
|
+
return;
|
|
607
609
|
const wsUrl = resolveWsUrl(wsUrlOption, options.transport.baseUrl);
|
|
608
610
|
resolveTransportHeaders(options.transport).then((headers) => {
|
|
609
611
|
if (closed)
|
package/package.json
CHANGED
|
@@ -101,7 +101,13 @@ export type CortexConfig = {
|
|
|
101
101
|
/** `'en' | 'ar'`, defaults to `'en'`. */
|
|
102
102
|
locale?: string;
|
|
103
103
|
transport: CortexTransport;
|
|
104
|
-
|
|
104
|
+
/**
|
|
105
|
+
* WebSocket endpoint override, derived from `transport.baseUrl` by default.
|
|
106
|
+
* `false` disables the socket entirely (chat still works fully over SSE;
|
|
107
|
+
* only cross-tab notify events are lost) — required behind proxies that do
|
|
108
|
+
* not forward `/ws`, which would otherwise reconnect forever.
|
|
109
|
+
*/
|
|
110
|
+
wsUrl?: string | false;
|
|
105
111
|
viewMode?: CortexViewMode;
|
|
106
112
|
/** Color scheme; `'system'` follows the OS preference. Defaults to `'light'`. */
|
|
107
113
|
theme?: CortexTheme;
|