Skip to content

Commit

Permalink
fix: fix redirection issue with Directus cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed Jan 20, 2023
1 parent ad224a1 commit 05a2f1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions revitron/analyze/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def get(self, endpoint, log=True):
dict: The reponse dictionary
"""
response = requests.get(
'{}/{}'.format(self.host, endpoint), headers=self._headers
'{}/{}'.format(self.host, endpoint),
headers=self._headers,
allow_redirects=True
)
try:
responseJson = response.json()
Expand All @@ -115,7 +117,8 @@ def post(self, endpoint, data):
response = requests.post(
'{}/{}'.format(self.host, endpoint),
headers=self._headers,
data=json.dumps(data)
data=json.dumps(data),
allow_redirects=True
)
try:
responseJson = response.json()
Expand Down

0 comments on commit 05a2f1f

Please sign in to comment.