From 840b7ba1b1bcfa7ac306fc1fff88a5695e94b1ee Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 26 Feb 2024 21:59:34 +0100 Subject: [PATCH] add ws headers host --- .../src/components/transports/WebSocket.vue | 19 +++++++++++++++++-- frontend/src/plugins/link.ts | 1 + frontend/src/types/transport.ts | 4 +++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/transports/WebSocket.vue b/frontend/src/components/transports/WebSocket.vue index fa899ee..80f659c 100644 --- a/frontend/src/components/transports/WebSocket.vue +++ b/frontend/src/components/transports/WebSocket.vue @@ -7,6 +7,15 @@ v-model="transport.path"> + + + + + + \ No newline at end of file diff --git a/frontend/src/plugins/link.ts b/frontend/src/plugins/link.ts index ff88244..203e183 100644 --- a/frontend/src/plugins/link.ts +++ b/frontend/src/plugins/link.ts @@ -150,6 +150,7 @@ export namespace LinkUtil { case TrspTypes.WebSocket: const tw = t params.path = tw.path?? null + params.host = tw.headers?.Host?? null break case TrspTypes.gRPC: const tg = t diff --git a/frontend/src/types/transport.ts b/frontend/src/types/transport.ts index 769dfa6..7805c66 100644 --- a/frontend/src/types/transport.ts +++ b/frontend/src/types/transport.ts @@ -25,7 +25,9 @@ export interface HTTP extends TransportBasics { export interface WebSocket extends TransportBasics { path: string - headers?: {} + headers?: { + Host: string + } max_early_data?: number early_data_header_name?: string }