Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUNDI-3562: Cleanup ER urls #2

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/actions/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def action_auth(integration: Integration, action_config: AuthenticateConfi
auth_config = action_config
url_parse = urlparse(integration.base_url)
async with AsyncERClient(
service_root=f"{integration.base_url}/api/v1.0",
service_root=f"{url_parse.scheme}://{url_parse.hostname}/api/v1.0",
username=auth_config.username,
password=auth_config.password,
token=auth_config.token,
Expand Down Expand Up @@ -57,7 +57,7 @@ async def action_pull_events(integration: Integration, action_config: PullEvents
# Prepare the ER client to extract events
url_parse = urlparse(integration.base_url)
er_client = AsyncERClient(
service_root=f"{integration.base_url}/api/v1.0",
service_root=f"{url_parse.scheme}://{url_parse.hostname}/api/v1.0",
username=auth_config.username or None,
password=auth_config.password or None,
token=auth_config.token,
Expand Down Expand Up @@ -121,7 +121,7 @@ async def action_pull_observations(integration: Integration, action_config: Pull
# Prepare the ER client to extract events
url_parse = urlparse(integration.base_url)
er_client = AsyncERClient(
service_root=f"{integration.base_url}/api/v1.0",
service_root=f"{url_parse.scheme}://{url_parse.hostname}/api/v1.0",
username=auth_config.username or None,
password=auth_config.password or None,
token=auth_config.token,
Expand Down