Addon ingress

I’ve created an addon that serves (and formats) documentation. Source is at hass-addons/doc-viewer at main · iot49/hass-addons · GitHub.

The addon works fine, but I would like to address two issues:

I’d like a link in the left panel of the Home Assistant ui. Apparently this requires enabling “ingress”.

Currently my configuration contains:

webui: "http://[HOST]:[PORT:8000]"
ports:
  8000/tcp: 8000

Replacing this with

ingress: true
ingress_port: 8000

breaks the addon, it now returns a 503 status.

The addon is based on a fastapi server with command

CMD ["./bin/python3", "-m", "gunicorn", "main:app", "--bind", "0.0.0.0:8000", \
        "--workers", "2", "--worker-class", "uvicorn.workers.UvicornWorker", \
        "--preload", "--log-level", "warning"]

i.e. it should allow connections from any port. This gets me to the 2nd issue: how can I make the addon ui available only to users authenticated with Home Assistant?

I created the sample nginx demo from the documentation for ingress and got it to serve index.html located at the root of the directory from which nginx serves static files.

However, I did not figure out how to access any other files from that directory. E.g.

https://myhass.org/hassio/ingress/c5db6b11_nginx-ingress-example/other.html

results in an error ( Supervisor: Unable to fetch add-on info to start Ingress).

How (e.g. by which url) can I access other files served by nginx?