mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
don't allow access from nextcloud-aio-nextcloud
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
0b0d872c05
commit
0bf4538fb9
1 changed files with 6 additions and 1 deletions
|
|
@ -135,14 +135,19 @@ chown www-data:www-data -R /mnt/docker-aio-config/session/
|
|||
chown www-data:www-data -R /mnt/docker-aio-config/caddy/
|
||||
chown root:root -R /mnt/docker-aio-config/certs/
|
||||
|
||||
# Don't allow access to the AIO interface directly from the Nextcloud container
|
||||
# Don't allow access to the AIO interface from the Nextcloud container
|
||||
# Probably more cosmetic than anything but at least an attempt
|
||||
if ! grep -q '# nextcloud-aio-block' /etc/apache2/apache2.conf; then
|
||||
if ! NETWORK_GATEWAY="$(docker inspect nextcloud-aio-mastercontainer --format "{{.NetworkSettings.Gateway}}")" || [ -z "$NETWORK_GATEWAY" ]; then
|
||||
echo "Could not get the gateway of the mastercontainer. Cannot continue."
|
||||
exit 1
|
||||
fi
|
||||
cat << APACHE_CONF >> /etc/apache2/apache2.conf
|
||||
# nextcloud-aio-block-start
|
||||
<Location />
|
||||
order allow,deny
|
||||
deny from nextcloud-aio-nextcloud.nextcloud-aio
|
||||
deny from $NETWORK_GATEWAY
|
||||
allow from all
|
||||
</Location>
|
||||
# nextcloud-aio-block-end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue