Update 91-nginx_ingress.sh

This commit is contained in:
Alexandre
2025-03-21 08:50:24 +01:00
committed by GitHub
parent 11df8ea0a0
commit a7e064d3a8

View File

@@ -54,8 +54,7 @@ php_file="$HOME/BirdNET-Pi/scripts/common.php"
if [ -f "$php_file" ]; then
sed -i "/function is_authenticated/a if (strpos(\$_SERVER['HTTP_REFERER'], '/api/hassio_ingress') !== false && strpos(\$_SERVER['HTTP_REFERER'], trim(file_get_contents('/ingress_url'))) !== false) { \$ret = true; return \$ret; }" "$php_file"
else
bashio::log.error "PHP file not found: $php_file"
exit 1
bashio::log.yellow "PHP file not found: $php_file"
fi
echo "... adapting Caddyfile for ingress"