mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-19 06:20:12 +02:00
* Fix FileBrowser Quantum direct web access
* fix(filebrowser_quantum): make direct ip:port access actually work
ports: {8080/tcp: 8071} alone (as originally proposed) publishes the app's
own port, but FileBrowser Quantum's server.baseURL is set at boot to the
Supervisor ingress-entry path (an opaque, per-install hash), so the app only
serves correctly under that exact path -- a bare port publish gives an
unreachable page, per alexbelgium's own analysis on #2978.
Add a second, dedicated nginx vhost (direct.conf) that proxies a fixed public
path (/filebrowser_quantum/) onto the same ingress-entry baseURL the existing
ingress vhost already targets, instead of changing the app's baseURL itself.
This leaves the ingress vhost, and therefore Ingress access, completely
unchanged -- only the new vhost is new surface area. config.yaml now
publishes the new vhost's internal port (8072) to host 8071, not the app's
own 8080 directly.
Co-authored-by: polmonta <polmonta05@gmail.com>
---------
Co-authored-by: polmonta <polmonta05@gmail.com>
Co-authored-by: alexbelgium <alexandre.pary@gmail.com>
25 lines
594 B
Plaintext
25 lines
594 B
Plaintext
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;
|
|
|
|
location = / {
|
|
return 302 /filebrowser_quantum/;
|
|
}
|
|
|
|
location = /filebrowser_quantum {
|
|
return 301 /filebrowser_quantum/;
|
|
}
|
|
|
|
location /filebrowser_quantum/ {
|
|
add_header Access-Control-Allow-Origin *;
|
|
proxy_connect_timeout 30m;
|
|
proxy_send_timeout 30m;
|
|
proxy_read_timeout 30m;
|
|
proxy_pass %%protocol%%://backend%%subpath%%;
|
|
}
|
|
}
|