Skip to content

Commit

Permalink
Remove sensitive info from debug log.
Browse files Browse the repository at this point in the history
  • Loading branch information
sander1988 committed May 24, 2024
1 parent d10caaa commit ec6e950
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyIndego/indego_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,17 @@ async def _request( # noqa: C901
headers["Authorization"] = "Bearer %s" % self._token

try:
log_headers = headers.copy()
if 'Authorization' in log_headers:
log_headers['Authorization'] = '******'
_LOGGER.debug(
"%s call to API endpoint %s, headers: %s, data: %s",
method.value,
url,
json.dumps(headers) if headers is not None else '',
json.dumps(data) if data is not None else '',
)

async with self._session.request(
method=method.value,
url=url,
Expand Down

0 comments on commit ec6e950

Please sign in to comment.