You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): add --case-sensitive option to har:sanitize command
Add support for case-sensitive matching via the --case-sensitive flag.
By default, field name matching is case-insensitive. When enabled,
only exact case matches will be redacted.
Usage:
har:sanitize input.har output.har --query-param api_key --case-sensitive
Copy file name to clipboardExpand all lines: src/Command/SanitizeCommand.php
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ protected function configure(): void
27
27
->addArgument('output', InputArgument::OPTIONAL, 'The output file path. Defaults to stdout.')
28
28
->addOption('header', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Header name to redact (can be specified multiple times).')
29
29
->addOption('query-param', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Query parameter name to redact (can be specified multiple times).')
30
-
->addOption('body-field', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Body field name to redact (can be specified multiple times).');
30
+
->addOption('body-field', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Body field name to redact (can be specified multiple times).')
31
+
->addOption('case-sensitive', null, InputOption::VALUE_NONE, 'Use case-sensitive matching for field names. Defaults to case-insensitive.');
31
32
}
32
33
33
34
protectedfunctionexecute(InputInterface$input, OutputInterface$output): int
@@ -59,6 +60,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
0 commit comments