mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Fix issue with server verification when working remotely.
This commit is contained in:
parent
637339ea62
commit
30c20b3061
4 changed files with 36 additions and 9 deletions
|
@ -39,7 +39,8 @@ class HTTPHandler(object):
|
|||
request_type='GET',
|
||||
headers=None,
|
||||
output_format='raw',
|
||||
return_type=False):
|
||||
return_type=False,
|
||||
no_token=False):
|
||||
|
||||
valid_request_types = ['GET', 'POST', 'PUT', 'DELETE']
|
||||
|
||||
|
@ -53,10 +54,12 @@ class HTTPHandler(object):
|
|||
else:
|
||||
handler = HTTPConnection(self.host, self.port, timeout=10)
|
||||
|
||||
if uri.find('?') > 0:
|
||||
token_string = '&X-Plex-Token=' + self.token
|
||||
else:
|
||||
token_string = '?X-Plex-Token=' + self.token
|
||||
token_string = ''
|
||||
if not no_token:
|
||||
if uri.find('?') > 0:
|
||||
token_string = '&X-Plex-Token=' + self.token
|
||||
else:
|
||||
token_string = '?X-Plex-Token=' + self.token
|
||||
|
||||
try:
|
||||
if headers:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue