[mass update] fix supporting multiple domains while enforcing ssl #13

Merged
3wordchant merged 2 commits from forceSsl into master 2025-09-17 12:56:18 +00:00
Owner

Script used for the mass update:

forcessl.sh Lines 1 to 31 in 88951c8e39
#!/bin/zsh
# set -x
set -e
dir=~/.abra/recipes
for r in `ls $dir`; do
cd "$dir/$r"
# check if recipe has SSLForceHost label
# skip if it's a commented line
# skip .swp binary file (found in radicale and I don't know what is it for)
if res=$(grep -r "SSLForceHost" . 2>/dev/null \
| grep -v "#-" | grep -v "# -" \
| grep -v ".swp"); then
branch=$(git branch --format '%(refname:short)' --list main master | head -n 1)
current_dir="${PWD##*/}"
git checkout $branch
git pull --rebase
yes | git branch -D forceSsl
git checkout -b forceSsl
for file in `echo $res | cut -d ":" -f 1`; do
# I use macos and BSD versions of tools like sed look weird :(
sed -i '' -e "s/headers.SSLForceHost=true/redirectscheme.scheme=https/" $file
sed -i '' -e "s/headers.SSLHost=.*/redirectscheme.permanent=true\"/" $file
done
git add $file
git commit -m "[mass update] fix supporting multiple domains while enforcing ssl"
git push --set-upstream origin forceSsl
echo "https://git.coopcloud.tech/coop-cloud/$current_dir/pulls/new/forceSsl"
fi
done

Script used for the mass update: https://git.coopcloud.tech/toolshed/oneoff-scripts/src/commit/88951c8e39cb39b5d66ad3927ed650986f097e16/forcessl.sh#L1-L31
ammaratef45 added 1 commit 2025-09-08 15:21:22 +00:00
[mass update] fix supporting multiple domains while enforcing ssl
Some checks failed
continuous-integration/drone/pr Build is failing
eecd67758b
3wordchant added 1 commit 2025-09-09 20:47:31 +00:00
fix: restore previous SSLForceHost behaviour
Some checks failed
continuous-integration/drone/pr Build is failing
97fd707ce1
Author
Owner

@3wordchant do you think this is safe to merge by now?

@3wordchant do you think this is safe to merge by now?
3wordchant merged commit 9918453a16 into master 2025-09-17 12:56:18 +00:00
3wordchant deleted branch forceSsl 2025-09-17 12:56:19 +00:00
Sign in to join this conversation.
No description provided.