Issue with X-HASSIO-KEY header (possible fix)

There is still an issue about the X-HASSIO-KEY giving an 401 error on Hassio.

I have tried several clean installs and old versions, but everytime the same issue occurs,
As of yet, I cannot understand why, but I have changed in utils.py this on line 478:

headers[“Authorization”] = “Bearer %s” % os.environ[“HASSIO_TOKEN”]

Together with setting “homeassistant_api”: true in the addon config.json this works.
My change is also on the http example page: https://www.home-assistant.io/integrations/http/

I have created a pull request, it is beyond me why x-hassio-key does not work (anymore) but I think the Authorization is a more generic approach anyway

1 Like

Thanks for the merge, I have tested the new version (2.4.15.2) and it works!

1 Like