Skip to content

Commit

Permalink
[client] Use urljoin to create API URL (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmut-the-guy authored Feb 2, 2024
1 parent 8405c5b commit 13fe0ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pycti/api/opencti_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io
import json
from typing import Union
from urllib.parse import urljoin

import magic
import requests
Expand Down Expand Up @@ -129,7 +130,7 @@ def __init__(

# Define API
self.api_token = token
self.api_url = url + "/graphql"
self.api_url = urljoin(url, "/graphql")
self.request_headers = {
"User-Agent": "pycti/" + __version__,
"Authorization": "Bearer " + token,
Expand Down

0 comments on commit 13fe0ca

Please sign in to comment.