feat:OSS切换
This commit is contained in:
@@ -181,6 +181,10 @@ public class PushServiceImpl implements PushService {
|
|||||||
try {
|
try {
|
||||||
Request request = buildRequest(requestBody, url, username, secret);
|
Request request = buildRequest(requestBody, url, username, secret);
|
||||||
|
|
||||||
|
request.headers().names().forEach(x->{
|
||||||
|
log.info(x+": {}",request.header(x));
|
||||||
|
});
|
||||||
|
|
||||||
try (Response response = okHttpClient.newCall(request).execute()) {
|
try (Response response = okHttpClient.newCall(request).execute()) {
|
||||||
// 2. 获取原始响应内容
|
// 2. 获取原始响应内容
|
||||||
String responseBody = response.body().string();
|
String responseBody = response.body().string();
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class OpenApiValidateFilter implements Filter {
|
|||||||
long currentTime = System.currentTimeMillis()/1000;
|
long currentTime = System.currentTimeMillis()/1000;
|
||||||
long timeDiff = Math.abs(currentTime - timestamp);
|
long timeDiff = Math.abs(currentTime - timestamp);
|
||||||
|
|
||||||
if (timeDiff > 300) {
|
if (timeDiff > 600) {
|
||||||
log.info("OpenApiValidateFilter==>{}","请求已过期,服务器时间:" + currentTime + " 请求时间:" + timestamp);
|
log.info("OpenApiValidateFilter==>{}","请求已过期,服务器时间:" + currentTime + " 请求时间:" + timestamp);
|
||||||
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL);
|
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user