1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-24 08:32:50 +02:00

[Config] CIDR API_ALLOW_FROM only allowed via API

This commit is contained in:
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 # 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, - # 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 # 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=
#API_KEY_READ_ONLY= #API_KEY_READ_ONLY=

View File

@ -262,6 +262,7 @@ for option in ${CONFIG_ARRAY[@]}; do
if ! grep -q ${option} mailcow.conf; then if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf" echo "Adding new option \"${option}\" to mailcow.conf"
echo '# Must be set for API_KEY to be active' >> 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 echo "#API_ALLOW_FROM=" >> mailcow.conf
fi fi
elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then