deploy Maps v13 update
This commit is contained in:
+6
-1
@@ -8,6 +8,7 @@ from __future__ import annotations
|
||||
|
||||
import html
|
||||
import ipaddress
|
||||
import os
|
||||
import re
|
||||
import socket
|
||||
import ssl
|
||||
@@ -23,7 +24,11 @@ EMAIL_RE = re.compile(r"[A-Z0-9._%+\-]+@[A-Z0-9.\-]+\.[A-Z]{2,63}", re.I)
|
||||
MAX_BODY_BYTES = 700_000
|
||||
MAX_REDIRECTS = 2
|
||||
MAX_PAGES = 2
|
||||
TIMEOUT_SECONDS = 8
|
||||
TIMEOUT_SECONDS = max(2, min(30, int(os.environ.get("WEBSITE_SCAN_TIMEOUT", "8"))))
|
||||
# getaddrinfo has no per-call timeout parameter on all supported platforms.
|
||||
# Set a bounded process default so a broken DNS server cannot hold a discovery
|
||||
# worker forever during website analysis.
|
||||
socket.setdefaulttimeout(TIMEOUT_SECONDS)
|
||||
|
||||
|
||||
class _PageParser(HTMLParser):
|
||||
|
||||
Reference in New Issue
Block a user