Skip to content

Bug: notification images aren't downloaded in case of certificate mismatch #42

Closed

Description

@andystewart999

Hi - for my particular deployment I use https with DuckDNS. For some reason my company has put DuckDNS on a blocklist so any URL with DuckDNS in it is being blocked so I planned to use the local IP address instead.

Of course that means that the full URL doesn't match the certificate path so I assume that's why the actual picture isn't showing up for notifications (as it works perfectly well if I use an http source, or an https source with the correct URL.

A workaround might be to just ignore, or add an option to ignore, certificate errors? At least for image URLs.

Cheers,
Andy

Activity

  1. LAB02-Admin commented on Mar 30, 2022

    @LAB02-Admin
    Member

    Hey @andystewart999, good point - I'll add the option to ignore image certificate errors in the next release, thanks.

  2. self-assigned this
    on Mar 30, 2022
  3. changed the title [-]Option to ignore certificate errors for the 'image' URL[/-] [+]Bug: notification images aren't downloaded in case of certificate mismatch[/+] on Mar 30, 2022
  4. andystewart999 commented on Mar 30, 2022

    @andystewart999
    Author

    Thanks very much!

  5. LAB02-Admin commented on Mar 31, 2022

    @LAB02-Admin
    Member

    Hey @andystewart999, I was busy adding the ignore certificate errors for images function in HASS.Agent (actually completed it), but afterwards I found out that's not the issue 😅

    It's because when you're using duckdns, you can't access HA locally anymore. I've fixed it by using the NGINX Home Assistant SSL proxy addon.

    Configuration steps:

    • Install NGINX Home Assistant SSL proxy addon
    • Configure as follows:
    certfile: fullchain.pem
    cloudflare: false
    customize:
      active: false
      default: nginx_proxy_default*.conf
      servers: nginx_proxy/*.conf
    domain: your_domain.duckdns.org
    hsts: max-age=31536000; includeSubDomains
    keyfile: privkey.pem
    • Start the addon, it'll give errors in the log, don't mind those
    • You probably changed the http section of configuration.yaml for the duckdns addon, change it to the following:
    http:
      use_x_forwarded_for: true
      trusted_proxies:
        - 172.30.33.0/24
    • Reboot Home Assistant
    • If you set port forwarding in your router, you need to change the destination port from 8123 to 443
    • You can ofc keep the source port the same, as long as it forwards to 443

    You should now be able to access your Home Assistant instance both through both the duckdns url and its local IP, and use the local IP to retrieve notification images.

    Let me know if you have any issues!

  6. andystewart999 commented on Apr 1, 2022

    @andystewart999
    Author

    OK, I'll give that a whirl. Thanks for the research and effort :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions