mirror of
https://github.com/pelican-dev/panel.git
synced 2026-07-15 19:53:59 +03:00
docker: parse TRUSTED_PROXIES from .env (#2378)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
if [ -f /pelican-data/.env ]; then
|
||||
echo ".env vars exist."
|
||||
# load specific env vars from .env used in the entrypoint and they are not already set
|
||||
for VAR in "APP_KEY" "APP_INSTALLED" "DB_CONNECTION" "DB_HOST" "DB_PORT"; do
|
||||
for VAR in "APP_KEY" "APP_INSTALLED" "DB_CONNECTION" "DB_HOST" "DB_PORT" "TRUSTED_PROXIES"; do
|
||||
echo "checking for ${VAR}"
|
||||
## skip if it looks like it might try to execute code
|
||||
if (grep "${VAR}" .env | grep -qE "\$\(|=\`|\$#"); then echo "var in .env may be executable or a comment, skipping"; continue; fi
|
||||
|
||||
Reference in New Issue
Block a user