lovelylain / hass_ingress

Home Assistant ingress feature, add additional ingress panels to your Home Assistant frontend.
Apache License 2.0
31 stars 6 forks source link

Basic authentication for work_mode: iframe #9

Closed zecoj closed 5 days ago

zecoj commented 1 month ago

Hi,

I'm having issues with an iframe that has basic authentication, I tried both

url: https://username:password@url.local and

url: https://url.local
headers:
  host: url.local
  authorization: Basic xxyyzz

But neither work.: 1st one: blank page, 2nd one: basic authentication pops up. Any idea?

lovelylain commented 1 month ago

Only work_mode:ingress supports headers option, try ingress mode first. If this mode is not supported you can use nginx to pass the authorization header, and work_mode:auth to integrate into HA. https://community.home-assistant.io/t/ingress-access-for-tandoor-recipes/717859

zecoj commented 1 month ago

Ah thanks for that. I got it working with ingress now. Out of curiosity, how would one go about authenticating with basic authentication in iframe mode?

lovelylain commented 5 days ago

iframe auth depends on browser. If you use work_mode:auth, you can pass the authorization header with nginx.