[PHP-FPM, Config] API key generated via mailcow.conf as rw access
parent
08d2bdd6c7
commit
730fa16a69
|
@ -132,7 +132,7 @@ if [[ ${API_ALLOW_FROM} != "invalid" ]] && \
|
||||||
if [[ ! -z ${VALIDATED_IPS} ]]; then
|
if [[ ! -z ${VALIDATED_IPS} ]]; then
|
||||||
mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} << EOF
|
mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} << EOF
|
||||||
DELETE FROM api;
|
DELETE FROM api;
|
||||||
INSERT INTO api (api_key, active, allow_from) VALUES ("${API_KEY}", "1", "${VALIDATED_IPS}");
|
INSERT INTO api (api_key, active, allow_from, access) VALUES ("${API_KEY}", "1", "${VALIDATED_IPS}", "rw");
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -102,7 +102,7 @@ services:
|
||||||
- rspamd
|
- rspamd
|
||||||
|
|
||||||
php-fpm-mailcow:
|
php-fpm-mailcow:
|
||||||
image: mailcow/phpfpm:1.58
|
image: mailcow/phpfpm:1.59
|
||||||
command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
|
command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-mailcow
|
- redis-mailcow
|
||||||
|
|
|
@ -277,6 +277,7 @@ IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
|
||||||
|
|
||||||
# Create or override API key for web ui
|
# Create or override API key for web ui
|
||||||
# You _must_ define API_ALLOW_FROM, which is a comma separated list of IPs
|
# You _must_ define API_ALLOW_FROM, which is a comma separated list of IPs
|
||||||
|
# The API key defined here has read-write access
|
||||||
# API_KEY allowed chars: a-z, A-Z, 0-9, -
|
# API_KEY allowed chars: a-z, A-Z, 0-9, -
|
||||||
|
|
||||||
#API_KEY=
|
#API_KEY=
|
||||||
|
|
Loading…
Reference in New Issue