add support for request_path (#208)
authorJulien Janier <redacted>
Wed, 5 Apr 2023 19:19:46 +0000 (15:19 -0400)
committerGitHub <redacted>
Wed, 5 Apr 2023 19:19:46 +0000 (21:19 +0200)
Co-authored-by: Julien Janier <redacted>
README.md
apache/docker-entrypoint.sh

index 0b606d46aa5ebfbfa55f5561ee76013151a9ee6f..2ab791ffc7eeabf6bf2a1513837c87c12afd3fcb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -32,6 +32,8 @@ The following env variables can be set to configure your Roundcube Docker instan
 
 `ROUNDCUBEMAIL_SMTP_PORT`  - SMTP port number; defaults to `587`
 
+`ROUNDCUBEMAIL_REQUEST_PATH` - Specify request path with reverse proxy; defaults to `/`
+
 `ROUNDCUBEMAIL_PLUGINS` - List of built-in plugins to activate. Defaults to `archive,zipdownload`
 
 `ROUNDCUBEMAIL_SKIN` - Configures the default theme. Defaults to `larry`
index a1a43563809d2d073ff8a41a083c0e60f74ad290..87d75dcdb54b434798d6eac2d539dadf4f30311d 100755 (executable)
@@ -70,6 +70,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
   : "${ROUNDCUBEMAIL_PLUGINS:=archive,zipdownload}"
   : "${ROUNDCUBEMAIL_SKIN:=elastic}"
   : "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}"
+  : "${ROUNDCUBEMAIL_REQUEST_PATH:=/}"
 
   if [ ! -e config/config.inc.php ]; then
     GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24`
@@ -100,6 +101,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
   \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}';
   \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}';
   \$config['plugins'] = array_filter(array_unique(array_merge(\$config['plugins'], ['${ROUNDCUBEMAIL_PLUGINS_PHP}'])));
+  \$config['request_path'] = '${ROUNDCUBEMAIL_REQUEST_PATH}';
   " > config/config.docker.inc.php
 
   if [ -e /run/secrets/roundcube_des_key ]; then
git clone https://git.99rst.org/PROJECT