refactor(OpenCode TLS): 共用 httpsAgent 建立邏輯
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ import {
|
||||
GITEA_REPOSITORY,
|
||||
GITEA_SKIP_TLS_VERIFY,
|
||||
PR_NUMBER,
|
||||
getOpenCodeHttpsAgent,
|
||||
getLLMConfig,
|
||||
shouldSkipOpenCodeTLSVerify,
|
||||
} from './config.js';
|
||||
import { verifyRemoteAccess } from './git.js';
|
||||
import { step, line, ok, error } from './log.js';
|
||||
@@ -30,7 +30,7 @@ const applyOpenCodeAuth = (headers) => {
|
||||
const opencodeAxiosOptions = (headers) => ({
|
||||
headers,
|
||||
timeout: 30000,
|
||||
httpsAgent: shouldSkipOpenCodeTLSVerify() ? new https.Agent({ rejectUnauthorized: false }) : undefined,
|
||||
httpsAgent: getOpenCodeHttpsAgent(),
|
||||
});
|
||||
|
||||
function giteaErr(e) {
|
||||
|
||||
Reference in New Issue
Block a user