Sebclem / hassio-nextcloud-backup

Hass.io Add-on: Backup your snapshots to Nextcloud
GNU General Public License v3.0
122 stars 16 forks source link

Can't reach Web UI in HA #121

Closed Sundown89 closed 2 years ago

Sundown89 commented 2 years ago

Describe the bug After putting my HA instance behind a reverse proxy I can't reach the Web UI anymore. Config was filled before and I could create backups to NC successfully with a fresh install. Now I can't change the config anymore. Logs say nextcloud connection failed, so I want to review and change the config. Error message when opening Web UI says: addressofha.duckdns.org refused connection. Reverse Proxy is Caddy, not Nginx. HA is on a VirtualBox VM.

Logs:

[2022-03-23 19:04:49] [info]:   Log level: debug
[2022-03-23 19:04:49] [info]:   Backup timeout: 5400000
[2022-03-23 19:04:49] [info]:   Satus : Go !
[2022-03-23 19:04:49] [error]:  Nextcloud config not found !
[2022-03-23 19:04:49] [info]:   Starting auto clean cron...
[2022-03-23 19:04:49] [warn]:   No Cron settings available.
[2022-03-23 19:04:49] [error]:  Nextcloud connection : FAIL !
[2022-03-23 19:04:49] [error]:  ... Nextcloud config not found !
[2022-03-23 19:04:49] [info]:   Hassio API : Go !

Expected behavior Open Web UI correctly so I can review and change config.

System Add-on version: 0.16.8 You are running the latest version of this add-on. System: Home Assistant OS 7.5 (amd64 / qemux86-64) Home Assistant Core: 2022.3.6 Home Assistant Supervisor: 2022.03.5

Sundown89 commented 2 years ago

Found it.

In my case this had to do with my Caddy reverse proxy config, the X-Frame-Options header in particular. This was set to DENY and therefore it denied access to an iFrame from https://my.domain.com, what this addon seems to use. Changed it to X-Frame-Options "ALLOW-FROM https://my.domain.com" and it works now.