fix: header saving in ws

This commit is contained in:
Siddharth Gelera
2025-09-15 10:57:56 +05:30
parent fe95452c13
commit 1edfa87d5d
2 changed files with 3 additions and 3 deletions

4
package-lock.json generated
View File

@@ -31929,9 +31929,9 @@
"axios": "^1.9.0",
"grpc-reflection-js": "^0.3.0",
"is-ip": "^5.0.1",
"ws": "^8.18.3",
"system-ca": "^2.0.1",
"tough-cookie": "^6.0.0"
"tough-cookie": "^6.0.0",
"ws": "^8.18.3"
},
"devDependencies": {
"@babel/preset-env": "^7.22.0",

View File

@@ -50,7 +50,7 @@ export const bruRequestToJson = (data: string | any, parsed: boolean = false): a
? _.get(json, 'grpc.method', '')
: String(_.get(json, 'http.method') ?? '').toUpperCase(),
url: _.get(json, urlPath[requestType], urlPath.default),
headers: requestType === 'grpc-request' ? _.get(json, 'metadata', []) : _.get(json, 'headers', []),
headers: ['grpc-request','ws-request'].includes(requestType) ? _.get(json, 'metadata', []) : _.get(json, 'headers', []),
auth: _.get(json, 'auth', {}),
body: _.get(json, 'body', {}),
script: _.get(json, 'script', {}),