mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Compare commits
2 Commits
lance/1228
...
lance/2026
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c784037ed4 | ||
|
|
f4d572b0d3 |
@@ -65,6 +65,20 @@ if [ "${BEHIND_PROXY}" == "true" ]; then
|
|||||||
export PARSED_APP_URL=":80"
|
export PARSED_APP_URL=":80"
|
||||||
export PARSED_AUTO_HTTPS="auto_https off"
|
export PARSED_AUTO_HTTPS="auto_https off"
|
||||||
export ASSET_URL=${APP_URL}
|
export ASSET_URL=${APP_URL}
|
||||||
|
|
||||||
|
# Write ASSET_URL to .env so PHP-FPM workers can read it (clear_env = yes by default)
|
||||||
|
ENV_FILE="/var/www/html/.env"
|
||||||
|
if [ -e "$ENV_FILE" ]; then
|
||||||
|
ENV_FILE="$(readlink -f "$ENV_FILE")"
|
||||||
|
else
|
||||||
|
ENV_FILE="/pelican-data/.env"
|
||||||
|
fi
|
||||||
|
ESCAPED_APP_URL="$(printf '%s' "$APP_URL" | sed 's/[&|]/\\&/g')"
|
||||||
|
if grep -q "^ASSET_URL=" "$ENV_FILE"; then
|
||||||
|
sed -i "s|^ASSET_URL=.*|ASSET_URL=${ESCAPED_APP_URL}|" "$ENV_FILE"
|
||||||
|
else
|
||||||
|
echo "ASSET_URL=${APP_URL}" >> "$ENV_FILE"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# disable caddy if SKIP_CADDY is set
|
# disable caddy if SKIP_CADDY is set
|
||||||
|
|||||||
Reference in New Issue
Block a user