From 7dbc9375079a07ed409390e19ceb53783d623c5f Mon Sep 17 00:00:00 2001 From: CaliBrain Date: Sun, 13 Apr 2025 13:04:54 -0400 Subject: [PATCH] Adding timeout to pyrequests (#127) Fix #124 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d7f22f4..a448fdd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,7 +72,7 @@ RUN chmod -R o+rx /usr/bin/chromium && \ # Our custom wanabe curl RUN echo "#!/bin/sh" > /usr/local/bin/pyrequests && \ - echo 'python -c "import sys, requests; url=sys.argv[1]; r=requests.get(url); print(r.text); sys.exit(0) if r.ok else sys.exit(1)" "$@"' \ + echo 'python -c "import sys, requests; url=sys.argv[1]; r=requests.get(url, timeout=10); print(r.text); sys.exit(0) if r.ok else sys.exit(1)" "$@"' \ >> /usr/local/bin/pyrequests && \ chmod +x /usr/local/bin/pyrequests @@ -123,4 +123,4 @@ RUN apt-get update && \ # RUN chmod +x /app/tor.sh # This is removed as it's done in the base stage setup # Override the default command to run Tor -CMD ["/app/tor.sh"] \ No newline at end of file +CMD ["/app/tor.sh"]