Files
nextcloud/Containers
Simon L. 4aea53cb2d mastercontainer: block the docker network gateway on the login endpoints
The `/api/auth/login` and `/api/auth/getlogin` endpoints are already blocked
for the nextcloud container. However containers that reach the mastercontainer
via the host use the gateway ip of the `nextcloud-aio` network as source
address, so requests from them were not caught by the existing matcher.

The gateway ip is now read in start.sh and exported as DOCKER_NETWORK_GATEWAY
so that it can be used via `remote_ip` in both Caddyfiles.

Note that this needs a second matcher block instead of an additional line in
the existing one because matchers of different types inside one named matcher
are AND'ed together, which would never match. Also `remote_host` only resolves
host names, hence the built-in `remote_ip` matcher is used for the ip.

If the `nextcloud-aio` network does not exist yet - it only gets created by the
php code once the containers get started for the first time - the value falls
back to localhost, which is a no-op for the matcher, and the actual gateway ip
gets applied on the next restart of the mastercontainer.

Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-08-05 11:59:13 +02:00
..
2026-06-25 14:58:40 +02:00
2026-08-04 13:40:30 +02:00