From 6cdab23f7f3bf59b92182f9b89574d25d2cc531f Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 3 Mar 2026 13:36:32 -0500 Subject: [PATCH] set baseURL to 127.0.0.1 instead of localhost --- module.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module.nix b/module.nix index 67ac081..f0d744d 100644 --- a/module.nix +++ b/module.nix @@ -338,12 +338,12 @@ let fi API_KEY=$(${grep} -oP '(?<=)[^<]+' "$CONFIG_XML") - BASE_URL="http://localhost:${builtins.toString inst.port}/api/${inst.apiVersion}" + BASE_URL="http://127.0.0.1:${builtins.toString inst.port}/api/${inst.apiVersion}" # Wait for API to become available echo "Waiting for ${name} API..." for i in $(seq 1 90); do - if ${curl} -sf "$BASE_URL/system/status" -H "X-Api-Key: $API_KEY" > /dev/null 2>&1; then + if ${curl} -sf --connect-timeout 5 "$BASE_URL/system/status" -H "X-Api-Key: $API_KEY" > /dev/null 2>&1; then echo "${name} API is ready" break fi @@ -405,12 +405,12 @@ let fi API_KEY=$(${awk} '/^auth:/{f=1} f && /apikey:/{gsub(/.*apikey: /, ""); print; exit}' "$CONFIG_YAML") - BASE_URL="http://localhost:${builtins.toString bazarrCfg.port}" + BASE_URL="http://127.0.0.1:${builtins.toString bazarrCfg.port}" # Wait for API to become available echo "Waiting for Bazarr API..." for i in $(seq 1 90); do - if ${curl} -sf "$BASE_URL/api/system/status" -H "X-API-KEY: $API_KEY" > /dev/null 2>&1; then + if ${curl} -sf --connect-timeout 5 "$BASE_URL/api/system/status" -H "X-API-KEY: $API_KEY" > /dev/null 2>&1; then echo "Bazarr API is ready" break fi