Skip to content

Commit

Permalink
[client] Hide Authorization header (opencti/9693)
Browse files Browse the repository at this point in the history
  • Loading branch information
SouadHadjiat committed Jan 24, 2025
1 parent c6b346c commit 3a67e94
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pycti/api/opencti_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ def set_synchronized_upsert_header(self, synchronized):
def set_previous_standard_header(self, previous_standard):
self.request_headers["previous-standard"] = previous_standard

def get_request_headers(self):
return self.request_headers
def get_request_headers(self, hide_token=True):
request_headers_copy = self.request_headers.copy()
if hide_token and "Authorization" in request_headers_copy:
request_headers_copy["Authorization"] = "*****"
return request_headers_copy

def set_retry_number(self, retry_number):
self.request_headers["opencti-retry-number"] = (
Expand Down

0 comments on commit 3a67e94

Please sign in to comment.