Skip to content

Commit

Permalink
➕ add https
Browse files Browse the repository at this point in the history
  • Loading branch information
lazhenyi committed Nov 19, 2024
1 parent 07e8916 commit b5c9b86
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GitDataAi Cloud</title>
<script>

</script>
</head>
<body>
<div id="root"></div>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"axios": "^1.7.7",
"https": "^1.0.0",
"i18next": "^23.16.5",
"i18next-browser-languagedetector": "^8.0.0",
"less": "^4.2.0",
Expand Down
7 changes: 3 additions & 4 deletions src/libs/Nets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ class Nets extends Urls {
options: object = {}
): Promise<any> {
try {
const agent = new https.Agent({
rejectUnauthorized: false
});
return await axios.post(this.baseUrl + urls, data, {
headers: {
...options,
},
httpsAgent: agent
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
});
} catch (e) {
return e;
Expand Down

0 comments on commit b5c9b86

Please sign in to comment.