Skip to content

Commit 7f68c24

Browse files
set headers based on the domain (#1199)
1 parent a1da133 commit 7f68c24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyicloud_ipd/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def _get_auth_headers(self, overrides: Optional[Dict[str, str]]=None) -> Dict[st
363363
"Content-Type": "application/json",
364364
"X-Apple-OAuth-Client-Id": "d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d",
365365
"X-Apple-OAuth-Client-Type": "firstPartyAuth",
366-
"X-Apple-OAuth-Redirect-URI": "https://www.icloud.com",
366+
"X-Apple-OAuth-Redirect-URI": "https://www.icloud.com.cn" if self.domain == "cn" else "https://www.icloud.com",
367367
"X-Apple-OAuth-Require-Grant-Code": "true",
368368
"X-Apple-OAuth-Response-Mode": "web_message",
369369
"X-Apple-OAuth-Response-Type": "code",

0 commit comments

Comments
 (0)