Remove deprecated X-Hassio-Key usage (#73783)

* Remove deprecated X-Hassio-Key usage

* ...

* Update const.py

* Update ingress.py

* Update test_ingress.py

Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
This commit is contained in:
Pascal Vizeli 2022-06-21 17:11:20 +02:00 committed by GitHub
parent 27209574d2
commit eac7c5f177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 21 deletions

View file

@ -13,8 +13,6 @@ from homeassistant.components.http import (
)
from homeassistant.const import SERVER_PORT
from .const import X_HASSIO
_LOGGER = logging.getLogger(__name__)
@ -246,7 +244,9 @@ class HassIO:
method,
f"http://{self._ip}{command}",
json=payload,
headers={X_HASSIO: os.environ.get("SUPERVISOR_TOKEN", "")},
headers={
aiohttp.hdrs.AUTHORIZATION: f"Bearer {os.environ.get('SUPERVISOR_TOKEN', '')}"
},
timeout=aiohttp.ClientTimeout(total=timeout),
)