refactor: 更改日志上传的api地址

11111
winter 9 months ago
parent b53fe0f7d6
commit 9aec66d1a7

@ -42,7 +42,7 @@ public class SparkGptClient implements InitializingBean {
// 初始化缓存
HistoryCache.init(sparkGptProperties.getCache_timeout(), sparkGptProperties.getCache_context());
// 初始化 authUrl
// log.info("[SPARK CHAT] 鉴权 endpoint : {}", this.authUrl);
// log.info("[SPARK CHAT] 鉴权 endpoint : {}", this.authUrl);
this.okHttpClient = new OkHttpClient.Builder()
.connectTimeout(180, TimeUnit.SECONDS)
.readTimeout(180, TimeUnit.SECONDS) // sse 接口的 readTimeout 不能设置小了

@ -14,6 +14,7 @@ public class BodyReaderRequestWrapper extends HttpServletRequestWrapper {
private final byte[] buff;
public BodyReaderRequestWrapper(HttpServletRequest request) throws IOException {
super(request);
// 将 body 中的内容读取到 buff 中
InputStream is = request.getInputStream();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] b = new byte[1024];

@ -108,7 +108,7 @@ public class UploadApiLogInterceptor implements HandlerInterceptor {
String requestData = root.toString();
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), requestData);
Request okRequest = new Request.Builder()
.url("https://teammodelosfunction.chinacloudsites.cn/api/http-log")
.url("http://cdhabook.teammodel.cn:8805/api/http-log")
.post(requestBody)
.build();

Loading…
Cancel
Save