Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
feat: ignore secure cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
rbideau committed Mar 10, 2022
1 parent 909215f commit eeb2042
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports.workspaceActions = [
});

const exported = JSON.parse(rawJsonString);

exported.resources.forEach((resource) => {
// Insomnia update the `modified` of a resource even when the resource
// has only been open in the app. This is very noisy when reviewing
Expand All @@ -34,6 +34,14 @@ module.exports.workspaceActions = [
if (resource.modified && resource.created) {
resource.modified = resource.created;
}

// Secure cookie should not be sync because they could leak
// authentication credentials
if (resource._type === 'cookie_jar') {
resource.cookies = resource.cookies.filter(
(cookie) => !cookie.secure
);
}
});

fs.writeFileSync(
Expand Down

0 comments on commit eeb2042

Please sign in to comment.