Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import type { ClientConfig } from "@/client/config";
import {
HEADER_RIVET_ACTOR,
HEADER_RIVET_TOKEN,
} from "@/common/actor-router-consts";
import { HEADER_RIVET_TOKEN } from "@/common/actor-router-consts";
import { combineUrlPath } from "@/utils";
import { getEndpoint } from "./api-utils";

Expand Down Expand Up @@ -78,7 +75,6 @@ function buildGuardHeadersForHttp(
headers.set(key, value);
}
// Add guard-specific headers
headers.set(HEADER_RIVET_ACTOR, actorId);
if (runConfig.token) {
headers.set(HEADER_RIVET_TOKEN, runConfig.token);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { ClientConfig } from "@/client/config";
import {
HEADER_CONN_PARAMS,
HEADER_ENCODING,
WS_PROTOCOL_ACTOR,
WS_PROTOCOL_CONN_ID,
WS_PROTOCOL_CONN_PARAMS,
WS_PROTOCOL_CONN_TOKEN,
Expand Down Expand Up @@ -41,14 +40,7 @@ export async function openWebSocketToActor(
// Create WebSocket connection
const ws = new WebSocket(
guardUrl,
buildWebSocketProtocols(
runConfig,
actorId,
encoding,
params,
connId,
connToken,
),
buildWebSocketProtocols(runConfig, encoding, params, connId, connToken),
);

// Set binary type to arraybuffer for proper encoding support
Expand All @@ -61,15 +53,13 @@ export async function openWebSocketToActor(

export function buildWebSocketProtocols(
runConfig: ClientConfig,
actorId: string,
encoding: Encoding,
params?: unknown,
connId?: string,
connToken?: string,
): string[] {
const protocols: string[] = [];
protocols.push(WS_PROTOCOL_RIVETKIT);
protocols.push(`${WS_PROTOCOL_ACTOR}${actorId}`);
protocols.push(`${WS_PROTOCOL_ENCODING}${encoding}`);
if (runConfig.token) {
protocols.push(`${WS_PROTOCOL_TOKEN}${runConfig.token}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ export class RemoteManagerDriver implements ManagerDriver {
// Build protocols
const protocols = buildWebSocketProtocols(
this.#config,
actorId,
encoding,
params,
connId,
Expand Down
Loading