fix(TLS 驗證): 套用全域憑證忽略設定

This commit is contained in:
2026-06-26 09:20:57 +00:00
parent 4431f2fec5
commit bc0df06445
5 changed files with 21 additions and 10 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
import axios from 'axios';
import https from 'https';
import { GITEA_TOKEN, GITEA_COMMENT_TOKEN, GITEA_SERVER_URL, GITEA_REPOSITORY, PR_NUMBER, PR_HEAD_SHA, PR_HEAD_BRANCH } from './config.js';
import { GITEA_TOKEN, GITEA_COMMENT_TOKEN, GITEA_SERVER_URL, GITEA_REPOSITORY, PR_NUMBER, PR_HEAD_SHA, PR_HEAD_BRANCH, getInsecureHttpsAgent } from './config.js';
import { line, warn } from './log.js';
const httpsAgent = new https.Agent({ rejectUnauthorized: false });
const httpsAgent = getInsecureHttpsAgent();
/**
* 產生呼叫 Gitea API 所需的 HTTP headers(含 Gitea token 授權與 JSON content-type)。
* 授權格式為 Gitea 專用的 `token <token>`,並非 OAuth Bearer。