nc-httpsonly: always use overwriteprotocol https in all cases

Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
nachoparker 2021-09-30 10:30:56 -06:00
parent c037c11dfc
commit f1c90f543d
3 changed files with 7 additions and 5 deletions

View File

@ -13,12 +13,11 @@ configure()
{
[[ -f /.ncp-image ]] && return 0
if [[ $ACTIVE == "no" ]]; then
local opt=Off proto=https
else
local opt=On proto=http
local opt=Off
else
local opt=On
fi
sed -i "s|RewriteEngine .*|RewriteEngine $opt|" /etc/apache2/sites-available/000-default.conf
ncc config:system:set overwriteprotocol --value="${proto}"
apachectl -k graceful
echo "Forcing HTTPS $opt"
}

View File

@ -1,5 +1,7 @@
[v1.39.17](https://github.com/nextcloud/nextcloudpi/commit/520f062) (2021-09-29) add bash completion to ncc
[v1.39.18](https://github.com/nextcloud/nextcloudpi/commit/edaf4f1) (2021-09-30) nc-httpsonly: always use overwriteprotocol https in all cases
[v1.39.17](https://github.com/nextcloud/nextcloudpi/commit/c037c11) (2021-09-29) add bash completion to ncc
[v1.39.16](https://github.com/nextcloud/nextcloudpi/commit/2be666b) (2021-09-27) nc-https: proto logic was inverted fix

View File

@ -35,6 +35,7 @@ EOF
# fix issue with reverse proxy infinite redirections
run_app nc-httpsonly
ncc config:system:set overwriteprotocol --value="https"
# bash completion for `ncc`
if ! [[ -f /usr/share/bash-completion/completions/ncp ]]; then