We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://scastie.scala-lang.org/zIFXMepwREOGGiV3e52kzQ
import sttp.client3._ import sttp.client3.logging.LogLevel import sttp.client3.logging.slf4j.Slf4jLoggingBackend val sensitiveHeader = "sensitive" basicRequest .get(uri"http://google.com") .header(sensitiveHeader, "NOT IGNORED") .send( Slf4jLoggingBackend( HttpURLConnectionBackend(), beforeCurlInsteadOfShow = true, logRequestBody = true, sensitiveHeaders = Set(sensitiveHeader), beforeRequestSendLogLevel = LogLevel.Info ) )
Output:
[run-main-0] INFO sttp.client3.logging.slf4j.Slf4jLoggingBackend - Sending request: curl \ --request GET \ --url 'http://google.com' \ --header 'sensitive: NOT IGNORED' \ --location \ --max-redirs 32
Expected: header "sensitive" is not logged.
Actual: header "sensitive" is logged.
The text was updated successfully, but these errors were encountered:
Redact sensitive headers in cURL logging
8bd4b0a
Fixes softwaremill#1390. Looks like sensitive headers argument was just missing.
Successfully merging a pull request may close this issue.
https://scastie.scala-lang.org/zIFXMepwREOGGiV3e52kzQ
Output:
Expected: header "sensitive" is not logged.
Actual: header "sensitive" is logged.
The text was updated successfully, but these errors were encountered: