Skip to content

Commit

Permalink
cleanup request and response generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiht committed Jun 30, 2020
1 parent bb883c0 commit 285f903
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/src/modules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ const headersToClean = [
"Accept-Encoding",
"Accept-Language",
"Connection",
"Content-Length",
"Date",
"Dnt",
"If-None-Match",
"Sec-Fetch-Dest",
"Sec-Fetch-Mode",
"Sec-Fetch-Site",
"Te",
"Upgrade-Insecure-Requests",
"User-Agent",
];
Expand All @@ -104,6 +107,7 @@ export const cleanupRequest = (historyEntry: Entry): EntryRequest => {
if (historyEntry.request.query_params) {
request.query_params = simplifyMultimap(historyEntry.request.query_params);
}
request = omit(request, "body_string") as EntryRequest;
request = omit(request, "date") as EntryRequest;
request = omit(request, "origin") as EntryRequest;
request = pickBy(request) as EntryRequest; // remove nulls
Expand Down

0 comments on commit 285f903

Please sign in to comment.