mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-14 03:59:25 +02:00
* fix(filebrowser_quantum): write the v2 config format so 2.0.0 starts v2 rejects the string server.database, the 1.x server.port/listen/baseURL keys and the FILEBROWSER_DATABASE variable, so both fresh installs and upgrades died at startup. Write http.* and server.database.path, and point migrateFrom at an existing 1.x BoltDB so upstream migrates it on first start. Fixes #3109 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): reset 1.x configs to the v2 default on upgrade Old installs carry a config copied from a 1.x image default, whose userDefaults layout v2 rejects as unknown fields. Deleting keys one by one cannot cover every 1.x variant, so back the file up and start from the v2 default, which the script then fills in as on a fresh install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(filebrowser_quantum): clarify migrateFrom comment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): follow the v2 migration guide and upstream healthcheck Set migrateFrom only until the SQLite database exists, set http.trustProxyHeaders for the nginx subpath, and check upstream's ${baseURL}health endpoint instead of an nginx-only stub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): convert 1.x configs in place instead of resetting Resetting to the v2 default dropped extra sources (breaking shares on them) and auth/OIDC settings. Both 1.x and 2.0 reject unknown keys, so the keys a 1.5.x config can hold that 2.0 lacks are exactly the settings-struct diff: move the server http keys under http and drop the removed ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(filebrowser_quantum): fix CHANGELOG entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): ask users to back up before the 2.0 upgrade Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): keep server.database siblings, sanitize direct XFF Set only server.database.path (dropping migrateFrom) so user-set keys such as activity survive, and replace X-Forwarded-For on the published 8071 listener now that FileBrowser trusts proxy headers for login rate limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): drop panel_admin default flagged by the add-on linter Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revert "fix(filebrowser_quantum): drop panel_admin default flagged by the add-on linter" Keep panel_admin: true explicit, per maintainer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(filebrowser_quantum): simplify the healthcheck Curl the app root: v2 answers 200, or 301 to the baseURL, which curl -f accepts, so the baseURL no longer has to be read from the config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
# FileBrowser trusts X-Forwarded-For (http.trustProxyHeaders) for login rate
|
|
# limits: keep the chain from the Supervisor ingress proxy, but replace
|
|
# whatever a client sends straight to the published port
|
|
map $server_port $fb_forwarded_for {
|
|
8072 $remote_addr;
|
|
default $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
server {
|
|
listen 0.0.0.0:8072 default_server;
|
|
|
|
include /etc/nginx/includes/server_params.conf;
|
|
include /etc/nginx/includes/proxy_params.conf;
|
|
|
|
client_max_body_size 0;
|
|
|
|
# nginx listens on 8072 inside the container but is published to the host
|
|
# as 8071. An absolute redirect would be built from $server_port and send
|
|
# the browser to :8072, which is not published and therefore unreachable.
|
|
absolute_redirect off;
|
|
|
|
# FileBrowser serves under its baseURL (the Supervisor ingress entry) and
|
|
# emits that prefix as absolute links in its HTML/JS, so the browser must
|
|
# use that same path here. The bare root and the two legacy paths below
|
|
# redirect to it; every other request is proxied through untouched, which
|
|
# keeps asset, API and websocket URLs working without response rewriting.
|
|
location = / {
|
|
return 302 %%subpath%%;
|
|
}
|
|
|
|
# 1.5.1.1 briefly documented /filebrowser_quantum/ as the direct URL. The
|
|
# app never served that path itself, so send those bookmarks on instead of
|
|
# letting them fall through to a 404.
|
|
location = /filebrowser_quantum {
|
|
return 302 %%subpath%%;
|
|
}
|
|
|
|
location = /filebrowser_quantum/ {
|
|
return 302 %%subpath%%;
|
|
}
|
|
|
|
location / {
|
|
proxy_connect_timeout 30m;
|
|
proxy_send_timeout 30m;
|
|
proxy_read_timeout 30m;
|
|
proxy_pass %%protocol%%://backend;
|
|
}
|
|
}
|