-
Notifications
You must be signed in to change notification settings - Fork 138
[client] Add capability to add custom headers in opencti http client (#844) #845
Conversation
| if auth is not None: | ||
| self.session = requests.session() | ||
| self.session.auth = auth | ||
| else: | ||
| self.session = requests.session() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this part has been removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont want the auth to be changed like that. You have the token,cert, custom hearders that will produce the auth.
pycti/api/opencti_api_client.py
Outdated
| json_logging: Optional[bool] = False, | ||
| bundle_send_to_queue: Optional[bool] = True, | ||
| cert: Optional[Union[str, Tuple[str, str]]] = None, | ||
| custom_headers: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc above the function is not up to date with custom_headers
aHenryJard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with pycti call locally, and debug header on OpenCTI side, work as expected.
It's just missing the update of the init documentation.
|
should be either targeting master or release/current, not 6.6.0 |
0acf3b8 to
a810e49
Compare
a810e49 to
c015e05
Compare
See #844
After merge, please take care of OpenCTI-Platform/opencti#9992