spot: add acc key
This commit is contained in:
parent
cff1e4801b
commit
d3f3b613ab
1 changed files with 5 additions and 4 deletions
|
|
@ -68,6 +68,7 @@ const sensitiveParams = new Set([
|
||||||
"auth",
|
"auth",
|
||||||
"proxy-authorization",
|
"proxy-authorization",
|
||||||
"set-cookie",
|
"set-cookie",
|
||||||
|
"account_key",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function filterHeaders(headers: Record<string, string>) {
|
function filterHeaders(headers: Record<string, string>) {
|
||||||
|
|
@ -105,7 +106,7 @@ function filterBody(body: any) {
|
||||||
parsedBody = JSON.parse(body);
|
parsedBody = JSON.parse(body);
|
||||||
isJSON = true;
|
isJSON = true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// not json
|
// not json
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isJSON) {
|
if (isJSON) {
|
||||||
|
|
@ -140,7 +141,7 @@ function obscureSensitiveData(obj: Record<string, any> | any[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function tryFilterUrl(url: string) {
|
function tryFilterUrl(url: string) {
|
||||||
if (!url) return ''
|
if (!url) return "";
|
||||||
try {
|
try {
|
||||||
const urlObj = new URL(url);
|
const urlObj = new URL(url);
|
||||||
if (urlObj.searchParams) {
|
if (urlObj.searchParams) {
|
||||||
|
|
@ -194,10 +195,10 @@ export function createSpotNetworkRequest(
|
||||||
let body;
|
let body;
|
||||||
if (trackedRequest.reqBody) {
|
if (trackedRequest.reqBody) {
|
||||||
try {
|
try {
|
||||||
body = filterBody(trackedRequest.reqBody)
|
body = filterBody(trackedRequest.reqBody);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
body = "Error parsing body";
|
body = "Error parsing body";
|
||||||
console.error(e)
|
console.error(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
body = "";
|
body = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue