[Config] CIDR API_ALLOW_FROM only allowed via API
parent
0f63a017db
commit
066b23bb02
|
@ -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=
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue