Hello everyone!
I’m working on a new add-on for hassio, to integrate this -> https://filebrowser.xyz/ to our home system.
It mount NFS disk inside the add-on and expose a cloud-like interface for users.
It works almost perfectly, but I would like to integrate automatic login, Because filebrowser support an auth method which consists of a header with the username.
Does currently Ingress send some kind of http header with the current user name?
The solution I found is able to use home-assistant credentials but it does not use ingress:
The app I wanted to create a home-assistant addon for (radicale) supported this “authentication-based header” described also on the first post in this thread.
I created an add-on that runs my app under the container’s localhost interface (in my case it runs on port 5232). This is only directly accessible from within the container.
The add-on container also runs an nginx server, which is the main endpoint of the add-on. The add-on exposes this nginx server. This nginx server presents a basic-auth form when it receives a request. It then uses the home asisstant supervisor API to validate the credentials and, if the validation succeeds, nginx sets in the received request a header of my choice (X-Remote-User) with the validated user name. The request is then forwarded to the container’s localhost:5232 so the app receives the request with the username and can provide a response.
Check my nginx configuration, yaml settings and Docker file at: