This repository was archived by the owner on Dec 5, 2025. It is now read-only.
[client] Add capability to add custom headers in opencti http client (#844)#845
Merged
SamuelHassine merged 2 commits intomasterfrom Apr 12, 2025
Merged
[client] Add capability to add custom headers in opencti http client (#844)#845SamuelHassine merged 2 commits intomasterfrom
SamuelHassine merged 2 commits intomasterfrom
Conversation
lndrtrbn
reviewed
Mar 28, 2025
Comment on lines
-146
to
-150
| if auth is not None: | ||
| self.session = requests.session() | ||
| self.session.auth = auth | ||
| else: | ||
| self.session = requests.session() |
Member
There was a problem hiding this comment.
Why this part has been removed?
Member
Author
There was a problem hiding this comment.
I dont want the auth to be changed like that. You have the token,cert, custom hearders that will produce the auth.
aHenryJard
reviewed
Apr 1, 2025
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, |
Member
There was a problem hiding this comment.
The doc above the function is not up to date with custom_headers
aHenryJard
approved these changes
Apr 1, 2025
Member
aHenryJard
left a comment
There was a problem hiding this comment.
Tested with pycti call locally, and debug header on OpenCTI side, work as expected.
It's just missing the update of the init documentation.
Member
|
should be either targeting master or release/current, not 6.6.0 |
0acf3b8 to
a810e49
Compare
a810e49 to
c015e05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #844
After merge, please take care of OpenCTI-Platform/opencti#9992