mirror of
https://gitee.com/fightroad/DicomSCP.git
synced 2025-12-06 10:38:57 +08:00
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user