Skip to content

Commit 7327a38

Browse files
Seann0824sean0824
andauthored
fix: ssl error (#56)
* feat: add httpsAgent configuration to HTTP utility functions - Introduced an httpsAgent with rejectUnauthorized set to false for all HTTP requests in the createHttpUtil function. - Updated axios request configurations to include the httpsAgent for enhanced flexibility in handling HTTPS requests. * fix: remove unused httpsAgent variable and set axios default httpsAgent - Eliminated the redundant httpsAgent variable from the createHttpUtil function. - Configured axios to use a default httpsAgent with rejectUnauthorized set to false for all requests, enhancing security handling. --------- Co-authored-by: sean0824 <sean0824@163.com>
1 parent 9716c93 commit 7327a38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import axios, { AxiosRequestConfig } from "axios";
22
import { parseToken, parseUrl, parseRules, parseNoRule } from "./args";
3+
import https from "https";
4+
5+
axios.defaults.httpsAgent = new https.Agent({
6+
rejectUnauthorized: false,
7+
});
38

49
// DSL response interface
510
export interface DslResponse {

0 commit comments

Comments
 (0)