From 7cce3f7173e666704f6c0599c30b3c8fce165074 Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Mon, 19 Jun 2017 13:54:21 +0000 Subject: [PATCH] Correct SELF_URL_PATH config to take SSL into account Signed-off-by: Kyle Mestery --- root/srv/setup-ttrss.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/root/srv/setup-ttrss.sh b/root/srv/setup-ttrss.sh index af3b2fb..be18204 100755 --- a/root/srv/setup-ttrss.sh +++ b/root/srv/setup-ttrss.sh @@ -59,7 +59,11 @@ setup_ttrss() cp ${TTRSS_PATH}/config.php-dist ${TTRSS_PATH}/config.php # Patch URL path. - sed -i -e 's@htt.*/@'"${SELF_URL_PATH-http://localhost/}"'@g' ${TTRSS_PATH}/config.php + if [ "$TTRSS_SSL_ENABLED" = "1" ]; then + sed -i -e 's@htt.*/@'"${SELF_URL_PATH-https://localhost/}"'@g' ${TTRSS_PATH}/config.php + else + sed -i -e 's@htt.*/@'"${SELF_URL_PATH-http://localhost/}"'@g' ${TTRSS_PATH}/config.php + fi # Enable additional system plugins: api_newsplus. sed -i -e "s/.*define('PLUGINS'.*/define('PLUGINS', 'api_newsplus, auth_internal, note, updater');/g" ${TTRSS_PATH}/config.php