本地共享密钥

This commit is contained in:
ChenYi 2025-06-09 11:28:33 +08:00
parent e2cf4fb91e
commit 7b67519d9e

View File

@ -1,5 +1,6 @@
using Hangfire.Redis.StackExchange; using Hangfire.Redis.StackExchange;
using JiShe.ServicePro.Core; using JiShe.ServicePro.Core;
using JiShe.ServicePro.FreeRedisProvider;
using Medallion.Threading; using Medallion.Threading;
using Medallion.Threading.Redis; using Medallion.Threading.Redis;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
@ -119,10 +120,10 @@ public partial class IoTHttpApiHostModule
Configure<AbpDistributedCacheOptions>( Configure<AbpDistributedCacheOptions>(
options => { options.KeyPrefix = "JiSheIoT:"; }); options => { options.KeyPrefix = "JiSheIoT:"; });
var configuration = context.Services.GetConfiguration(); var configuration = context.Services.GetConfiguration();
var redis = ConnectionMultiplexer.Connect(configuration.GetValue<string>("Redis:Configuration"));
context.Services context.Services
.AddDataProtection() .AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "JiSheIoTAdmin-Protection-Keys"); .PersistKeysToStackFreeRedis("JiSheIoTAdmin-Protection-Keys");
} }
/// <summary> /// <summary>