Skip to content

Commit

Permalink
Support user_agent http header
Browse files Browse the repository at this point in the history
  • Loading branch information
isimluk committed Nov 16, 2022
1 parent 08aea27 commit 147cd82
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion ccib/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = '0.0.1'
from .version import __version__

__all__ = ['__version__']
10 changes: 6 additions & 4 deletions ccib/falcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .config import config
from .log import log
from .helper import thousands
from .version import __version__


class ApiError(Exception):
Expand All @@ -19,10 +20,11 @@ class FalconAPI():
}

def __init__(self):
client_id = config.get('falcon', 'client_id')
client_secret = config.get('falcon', 'client_secret')
crowdstrike_url = self.__class__.base_url()
self.intel = Intel(client_id=client_id, client_secret=client_secret, base_url=crowdstrike_url)
self.intel = Intel(client_id=config.get('falcon', 'client_id'),
client_secret=config.get('falcon', 'client_secret'),
base_url=self.__class__.base_url(),
user_agent=f"chronicle-intel-bridge/{__version__}"
)

@classmethod
def base_url(cls):
Expand Down
1 change: 1 addition & 0 deletions ccib/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.1'

0 comments on commit 147cd82

Please sign in to comment.