Skip to content

Commit

Permalink
Some changes in CSRF token update method
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Dec 5, 2024
1 parent f62ff83 commit a1a4ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/yandex_station/core/yandex_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ async def request(self, method: str, url: str, retry: int = 2, **kwargs):
self.last_ts = time.time()

# all except GET should contain CSRF token
if method != "get" and "headers" not in kwargs:
if method != "get" and not url.startswith("https://rpc.alice.yandex.ru"):
if self.csrf_token is None:
_LOGGER.debug(f"Обновление CSRF-токена, proxy: {self.proxy}")
r = await self._get(
Expand Down

0 comments on commit a1a4ab9

Please sign in to comment.