diff --git a/FastGithub.Scanner/ScanMiddlewares/HttpsScanMiddleware.cs b/FastGithub.Scanner/ScanMiddlewares/HttpsScanMiddleware.cs
index 534f216..64ac325 100644
--- a/FastGithub.Scanner/ScanMiddlewares/HttpsScanMiddleware.cs
+++ b/FastGithub.Scanner/ScanMiddlewares/HttpsScanMiddleware.cs
@@ -58,6 +58,7 @@ namespace FastGithub.Scanner.ScanMiddlewares
request.Method = new HttpMethod(rule.Method);
request.RequestUri = new Uri(new Uri($"https://{context.Address}"), rule.Path);
request.Headers.Host = context.Domain;
+ request.Headers.ConnectionClose = setting.ConnectionClose;
var timeout = this.options.CurrentValue.Timeout;
using var timeoutTokenSource = new CancellationTokenSource(timeout);
diff --git a/FastGithub.Scanner/ScanMiddlewares/HttpsScanOptions.cs b/FastGithub.Scanner/ScanMiddlewares/HttpsScanOptions.cs
index 6acadc4..f5af2b6 100644
--- a/FastGithub.Scanner/ScanMiddlewares/HttpsScanOptions.cs
+++ b/FastGithub.Scanner/ScanMiddlewares/HttpsScanOptions.cs
@@ -14,6 +14,11 @@ namespace FastGithub.Scanner.ScanMiddlewares
///
public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(5d);
+ ///
+ /// 是否使用短连接
+ ///
+ public bool ConnectionClose { get; set; } = false;
+
///
/// 各域名扫描规则
///
diff --git a/FastGithub/appsettings.json b/FastGithub/appsettings.json
index 09b598c..9108f66 100644
--- a/FastGithub/appsettings.json
+++ b/FastGithub/appsettings.json
@@ -13,14 +13,18 @@
},
"HttpsScan": {
"Timeout": "00:00:05", // httpsɨ賬ʱʱ
+ "ConnectionClose": false, // Ƿʹö
"Rules": {
"github.githubassets.com": {
+ "Method": "HEAD",
"Path": "/favicons/favicon.png"
},
"avatars.githubusercontent.com": {
+ "Method": "HEAD",
"Path": "/u/8308014?s=40&v=4"
},
"raw.githubusercontent.com": {
+ "Method": "HEAD",
"Path": "/xljiulang/FastGithub/master/README.md"
}
}