silence firefox security nag on apline 3.20 and higher

This commit is contained in:
Teja Swaroop Pothala 2025-04-30 03:19:51 -04:00
parent e0b88073ed
commit 0f2b2dde2a
No known key found for this signature in database
GPG Key ID: DEBCE0B52FABDAAC

View File

@ -20,6 +20,14 @@ done
# Creating a default profile
firefox -headless -CreateProfile "kasm $HOME/.mozilla/firefox/kasm"
# For alpine 3.20 and later, firefox version shows a security nag. Silence it.
if [ "$(printf '%s\n' 3.20 $(cat /etc/alpine-release) | sort -V | head -n 1)" = "3.20" ]; then
echo 'user_pref("security.sandbox.warn_unprivileged_namespaces", false);' > $HOME/.mozilla/firefox/kasm/user.js
chown 1000:1000 $HOME/.mozilla/firefox/kasm/user.js
fi
# Generate a certdb to be detected on squid start
HOME=/root firefox --headless &
mkdir -p /root/.mozilla