Adding timeout to pyrequests (#127)

Fix #124
This commit is contained in:
CaliBrain
2025-04-13 13:04:54 -04:00
committed by GitHub
parent 666d7ba849
commit 7dbc937507
+2 -2
View File
@@ -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"]
CMD ["/app/tor.sh"]