Skip to content

Commit 4af6007

Browse files
committed
排除安全问题
1 parent ca6cf15 commit 4af6007

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/guides/model_convert/convert_from_pytorch/tools/validate_api_difference.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
# 默认文件路径
1616
DEFAULT_FILE_PATH = "/workspace/paddleDocs/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md"
1717

18-
# 用户代理头,模拟浏览器访问
19-
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
18+
USER_AGENT = ""
2019

2120
# 重试策略配置
2221
RETRY_STRATEGY = Retry(
@@ -33,7 +32,6 @@ def create_session():
3332
adapter = HTTPAdapter(max_retries=RETRY_STRATEGY)
3433
session.mount("http://", adapter)
3534
session.mount("https://", adapter)
36-
session.headers.update({"User-Agent": USER_AGENT})
3735
return session
3836

3937

0 commit comments

Comments
 (0)