mirror of
https://github.com/librespeed/speedtest.git
synced 2026-08-27 03:46:58 +00:00
Update docker/entrypoint.sh
Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com>
This commit is contained in:
parent
fd06e94de3
commit
64e4c3b768
1 changed files with 6 additions and 2 deletions
|
|
@ -79,8 +79,12 @@ if [[ "$TELEMETRY" == "true" && ("$MODE" == "frontend" || "$MODE" == "standalone
|
|||
if [ "$ENABLE_ID_OBFUSCATION" == "true" ]; then
|
||||
sed -i s/\$enable_id_obfuscation\ =\ .*\;/\$enable_id_obfuscation\ =\ true\;/g /var/www/html/results/telemetry_settings.php
|
||||
if [ ! -z "$OBFUSCATION_SALT" ]; then
|
||||
echo "<?php" > /var/www/html/results/idObfuscation_salt.php
|
||||
echo "\$OBFUSCATION_SALT = $OBFUSCATION_SALT;" >> /var/www/html/results/idObfuscation_salt.php
|
||||
if [[ "$OBFUSCATION_SALT" =~ ^0x[0-9a-fA-F]+$ ]]; then
|
||||
echo "<?php" > /var/www/html/results/idObfuscation_salt.php
|
||||
echo "\$OBFUSCATION_SALT = $OBFUSCATION_SALT;" >> /var/www/html/results/idObfuscation_salt.php
|
||||
else
|
||||
echo "WARNING: Invalid OBFUSCATION_SALT format. It must be a hex string (e.g., 0x1234abcd). Using random salt." >&2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue