Skip to content

Commit

Permalink
1. 修改 User-Agent 字符串,目前填写的是无意义的随机字符串,避免 403 Forbidden 问题。
Browse files Browse the repository at this point in the history
    该问题的详细信息查看:floxay/python-riot-auth#18
2. hutool版本更新:5.8.10 -> 5.8.21
  • Loading branch information
Ultronxr committed Aug 23, 2023
1 parent 64be594 commit 68e0a58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<devtools.version>2.3.5.RELEASE</devtools.version>
<jetbrains.annotations.verison>23.1.0</jetbrains.annotations.verison>
<lombok.version>1.18.24</lombok.version>
<hutool.version>5.8.10</hutool.version>
<hutool.version>5.8.21</hutool.version>
<aliyun-sdk-oss.version>3.11.0</aliyun-sdk-oss.version>
<tencentcloud-sdk-java.version>3.1.800</tencentcloud-sdk-java.version>
<tencentcloud-sdk-java-cos.version>5.6.133</tencentcloud-sdk-java-cos.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public boolean batchUpdateBoth(boolean isDistributed) {
// 处理一个账号数据需要请求4-6次API(包括RSO认证),2分钟的请求上限为20个账号,即6秒处理一个账号
// 实测处理一个账号数据请求时间为1.5秒左右,添加 sleep
try {
singleItemOffersWithSleep(userId, date, 1.5f);
singleItemOffersWithSleep(userId, date, 1.6f);
} catch (Exception e) {
log.warn("更新未预更新token账号的每日商店+夜市数据时抛出异常!", e);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/cn/ultronxr/valorant/util/RSOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public class RSOUtils {

private static final Map<String, String> HEADER = new HashMap<>() {{
put("Accept-Encoding", "deflate, gzip, zstd");
put("User-Agent", RSO.DEFAULT_RIOT_CLIENT_AGENT);
// put("User-Agent", RSO.DEFAULT_RIOT_CLIENT_AGENT);
put("User-Agent", "ASGenPoj/5.89.6"); // random UA string to avoid 403 forbidden issue
put("Cache-Control", "no-cache");
put("Accept", "application/json");
put("Content-Type", "application/json");
Expand Down

0 comments on commit 68e0a58

Please sign in to comment.