Skip to content

Commit

Permalink
Issue #188: Add headers to OPTION request to fix broken auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreydwalter committed Feb 20, 2022
1 parent 92a81a7 commit a8e7438
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arlo.py
Expand Up @@ -139,6 +139,10 @@ def Login(self, username, password):
self.request = Request()

headers = {
'Access-Control-Request-Headers': 'content-type,source,x-user-device-id,x-user-device-name,x-user-device-type',
'Access-Control-Request-Method': 'POST',
'Origin': f'https://{self.BASE_URL}',
'Referer': f'https://{self.BASE_URL}/',
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone)',
}
self.request.options(f'https://{self.AUTH_URL}/api/auth', headers=headers)
Expand Down

0 comments on commit a8e7438

Please sign in to comment.