Skip to content

Commit

Permalink
Merge pull request #123 from intezer/feature/fix-endpoint-analysis-urls
Browse files Browse the repository at this point in the history
feature(endpoint_analysis_api) - support analysis over http for endpo… ON-PREM-121
  • Loading branch information
almogch authored Dec 18, 2023
2 parents 6796395 + 7fefdfe commit 2f6b2f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.19.7
------
- Fix system URL for EndpointAnalysis

1.19.6
------
- Add InvalidUrlError
Expand Down
2 changes: 1 addition & 1 deletion intezer_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.19.6'
__version__ = '1.19.7'
7 changes: 2 additions & 5 deletions intezer_sdk/_endpoint_analysis_api.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import gzip
from typing import List
from urllib.parse import urlparse

from intezer_sdk.api import raise_for_status

from intezer_sdk.api import IntezerApiClient
from intezer_sdk.api import raise_for_status


class EndpointScanApi:
Expand All @@ -13,8 +11,7 @@ def __init__(self, scan_id: str, api: IntezerApiClient):
if not scan_id:
raise ValueError('scan_id must be provided')
self.scan_id = scan_id
api_base = f'https://{urlparse(api.base_url).netloc}'
self.base_url = f'{api_base}/scans/scans/{scan_id}'
self.base_url = f"{api.base_url.replace('/api/','')}/scans/scans/{scan_id}"

def request_with_refresh_expired_access_token(self, *args, **kwargs):
return self.api.request_with_refresh_expired_access_token(base_url=self.base_url, *args, **kwargs)
Expand Down

0 comments on commit 2f6b2f8

Please sign in to comment.