Skip to content

Commit c1b330c

Browse files
committed
ovl: add user-agent to prevent being blocked by cloudflare
1 parent 21d1366 commit c1b330c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/ovl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def UrlOpen(state, url, headers=[], data=None, method='GET'):
138138
"""
139139
url = MakeRequestUrl(state, url)
140140
headers = list(headers) # Make a copy to avoid modifying the original
141+
headers.append(('User-Agent', _USER_AGENT))
141142
if state.jwt_token:
142143
headers.append(JWTAuthHeader(state.jwt_token))
143144
if data is not None:
@@ -1080,7 +1081,6 @@ def Connect(self, args):
10801081
code, except_str, body = ret[1:]
10811082
if code == 401:
10821083
print('connect: %s' % body)
1083-
prompt = True
10841084
if not username_provided or not password_provided:
10851085
continue
10861086
break

0 commit comments

Comments
 (0)