Revert "兼容linux"

This reverts commit 79132c2669.
This commit is contained in:
ztx
2025-01-06 13:24:02 +08:00
parent 79132c2669
commit fa7a9c1533

View File

@@ -11,18 +11,9 @@ using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication;
using System.Runtime.InteropServices;
using Microsoft.AspNetCore.Rewrite;
using Microsoft.AspNetCore.DataProtection;
var builder = WebApplication.CreateBuilder(args);
// 在 Linux 环境下配置数据保护
if (!OperatingSystem.IsWindows())
{
builder.Services.AddDataProtection()
.SetApplicationName("DicomSCP")
.DisableAutomaticKeyGeneration(); // 禁用自动密钥生成
}
// 配置控制台(跨平台支持)
if (Environment.UserInteractive)
{