Skip to content

Commit 8499e1e

Browse files
committed
chore(rivetkit): remove unneeded headers & protocols in requests
1 parent 87467c8 commit 8499e1e

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

rivetkit-typescript/packages/rivetkit/src/remote-manager-driver/actor-http-client.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import type { ClientConfig } from "@/client/config";
2-
import {
3-
HEADER_RIVET_ACTOR,
4-
HEADER_RIVET_TOKEN,
5-
} from "@/common/actor-router-consts";
2+
import { HEADER_RIVET_TOKEN } from "@/common/actor-router-consts";
63
import { combineUrlPath } from "@/utils";
74
import { getEndpoint } from "./api-utils";
85

@@ -78,7 +75,6 @@ function buildGuardHeadersForHttp(
7875
headers.set(key, value);
7976
}
8077
// Add guard-specific headers
81-
headers.set(HEADER_RIVET_ACTOR, actorId);
8278
if (runConfig.token) {
8379
headers.set(HEADER_RIVET_TOKEN, runConfig.token);
8480
}

rivetkit-typescript/packages/rivetkit/src/remote-manager-driver/actor-websocket-client.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { ClientConfig } from "@/client/config";
22
import {
33
HEADER_CONN_PARAMS,
44
HEADER_ENCODING,
5-
WS_PROTOCOL_ACTOR,
65
WS_PROTOCOL_CONN_ID,
76
WS_PROTOCOL_CONN_PARAMS,
87
WS_PROTOCOL_CONN_TOKEN,
@@ -41,14 +40,7 @@ export async function openWebSocketToActor(
4140
// Create WebSocket connection
4241
const ws = new WebSocket(
4342
guardUrl,
44-
buildWebSocketProtocols(
45-
runConfig,
46-
actorId,
47-
encoding,
48-
params,
49-
connId,
50-
connToken,
51-
),
43+
buildWebSocketProtocols(runConfig, encoding, params, connId, connToken),
5244
);
5345

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

6254
export function buildWebSocketProtocols(
6355
runConfig: ClientConfig,
64-
actorId: string,
6556
encoding: Encoding,
6657
params?: unknown,
6758
connId?: string,
6859
connToken?: string,
6960
): string[] {
7061
const protocols: string[] = [];
7162
protocols.push(WS_PROTOCOL_RIVETKIT);
72-
protocols.push(`${WS_PROTOCOL_ACTOR}${actorId}`);
7363
protocols.push(`${WS_PROTOCOL_ENCODING}${encoding}`);
7464
if (runConfig.token) {
7565
protocols.push(`${WS_PROTOCOL_TOKEN}${runConfig.token}`);

rivetkit-typescript/packages/rivetkit/src/remote-manager-driver/mod.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ export class RemoteManagerDriver implements ManagerDriver {
383383
// Build protocols
384384
const protocols = buildWebSocketProtocols(
385385
this.#config,
386-
actorId,
387386
encoding,
388387
params,
389388
connId,

0 commit comments

Comments
 (0)