Skip to content

Commit f7fa376

Browse files
committed
move magic string to constants
1 parent e8f9c58 commit f7fa376

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/LibraryManager/Cache/WebRequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private HttpClient CreateHttpClient(string url)
6262
#pragma warning disable CA2000 // Dispose objects before losing scope
6363
var httpMessageHandler = new HttpClientHandler();
6464
#pragma warning restore CA2000 // Dispose objects before losing scope
65-
if (_settings.TryGetValue("forcetls12", out string value) && value.Length > 0)
65+
if (_settings.TryGetValue(Constants.ForceTls12, out string value) && value.Length > 0)
6666
{
6767
httpMessageHandler.SslProtocols = System.Security.Authentication.SslProtocols.Tls12;
6868
}

src/LibraryManager/Configuration/Constants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ internal class Constants
1717
public const string HttpsProxyPassword = "https_proxy.password";
1818
public const string HttpsProxyBypass = "https_proxy.bypass";
1919

20+
public const string ForceTls12 = "forcetls12";
2021
}
2122
}

0 commit comments

Comments
 (0)