mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Fix issues with GitHub rejecting the requests
This commit is contained in:
parent
7c5177bf43
commit
69307fba6f
|
@ -76,7 +76,12 @@ try:
|
|||
content = Path(normpath(plugin_urls[7:])).read_bytes()
|
||||
else:
|
||||
content = b""
|
||||
resp = get(plugin_url, stream=True, timeout=10)
|
||||
resp = get(
|
||||
plugin_url,
|
||||
headers={"User-Agent": "BunkerWeb"},
|
||||
stream=True,
|
||||
timeout=30,
|
||||
)
|
||||
|
||||
if resp.status_code != 200:
|
||||
logger.warning(f"Got status code {resp.status_code}, skipping...")
|
||||
|
|
|
@ -29,8 +29,9 @@ try:
|
|||
|
||||
response = get(
|
||||
"https://github.com/bunkerity/bunkerweb/releases/latest",
|
||||
headers={"User-Agent": "BunkerWeb"},
|
||||
allow_redirects=True,
|
||||
timeout=5,
|
||||
timeout=10,
|
||||
)
|
||||
response.raise_for_status()
|
||||
|
||||
|
|
Loading…
Reference in a new issue