Skip to content

Commit

Permalink
Merge pull request #139 from Thiht/cleanup-request-response
Browse files Browse the repository at this point in the history
cleanup request and response generation
  • Loading branch information
Thiht authored Jun 30, 2020
2 parents bb883c0 + 285f903 commit 04953e4
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 04953e4

Please sign in to comment.