mirror of
https://github.com/librespeed/speedtest.git
synced 2026-08-03 22:28:24 +00:00
Support legacy EMAIL env var as deprecated fallback for GDPR_EMAIL (#781)
* Initial plan * Fix: Support legacy EMAIL env var as fallback for GDPR_EMAIL in privacy policy Agent-Logs-Url: https://github.com/librespeed/speedtest/sessions/337248e4-5c7a-4472-ad3b-381e0cd29c96 Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * fix stderr logging --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at>
This commit is contained in:
parent
3bd9e1b7af
commit
d2b9c724e6
2 changed files with 8 additions and 1 deletions
|
|
@ -85,6 +85,13 @@ if [[ "$MODE" == "frontend" || "$MODE" == "dual" || "$MODE" == "standalone" ]];
|
|||
sed -i "s/var SPEEDTEST_SERVERS = \\[/var SPEEDTEST_SERVERS = \"$SERVER_LIST_URL_ESCAPED\";\\n\\t\\t\\/\\*/" /var/www/html/index-classic.html
|
||||
fi
|
||||
|
||||
# Support legacy EMAIL env var as fallback for GDPR_EMAIL
|
||||
if [ -z "$GDPR_EMAIL" ] && [ ! -z "$EMAIL" ]; then
|
||||
echo "WARNING: EMAIL env var is deprecated, please use GDPR_EMAIL instead" >&2
|
||||
GDPR_EMAIL="$EMAIL"
|
||||
echo "GDPR_EMAIL: $GDPR_EMAIL"
|
||||
fi
|
||||
|
||||
# Replace GDPR email placeholder if GDPR_EMAIL is set
|
||||
if [ ! -z "$GDPR_EMAIL" ]; then
|
||||
# Escape special sed characters: & (replacement), / (delimiter), \ (escape), $ (variable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue