Skip to content

Commit

Permalink
nc-httpsonly: always use overwriteprotocol https in all cases
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <[email protected]>
  • Loading branch information
nachoparker committed Sep 30, 2021
1 parent c037c11 commit f1c90f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions bin/ncp/CONFIG/nc-httpsonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions updates/1.40.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1c90f5

Please sign in to comment.