[Config] CIDR API_ALLOW_FROM only allowed via API

master
andryyy 2020-05-04 07:50:59 +02:00
parent 0f63a017db
commit 066b23bb02
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 2 additions and 0 deletions

View File

@ -285,6 +285,7 @@ IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
# An API key defined as API_KEY_READ_ONLY has read-only access
# Allowed chars for API_KEY and API_KEY_READ_ONLY: a-z, A-Z, 0-9, -
# You can define API_KEY and/or API_KEY_READ_ONLY
# Using CIDR is not yet implemented within mailcow.conf, use the UI to allow networks.
#API_KEY=
#API_KEY_READ_ONLY=

View File

@ -262,6 +262,7 @@ for option in ${CONFIG_ARRAY[@]}; do
if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf"
echo '# Must be set for API_KEY to be active' >> mailcow.conf
echo '# IPs only, no networks (networks can be set via UI)' >> mailcow.conf
echo "#API_ALLOW_FROM=" >> mailcow.conf
fi
elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then