Skip to content

Data protection keys got vanished by cache keys when using OrchardCore.Redis.DataProtection together with OrchardCore.Redis.Cache #18622

@lamualfa

Description

@lamualfa

When using OrchardCore.Redis.DataProtection only:
Image


When using OrchardCore.Redis.DataProtection together with OrchardCore.Redis.Cache:

Image

Startup.cs

public class Startup
{
    // Another code

    public void ConfigureServices(IServiceCollection services)
    {
        services.AddControllers();
        services.AddHttpClient();

        services.AddHsts(options =>
        {
            options.MaxAge = TimeSpan.FromDays(365);
            options.IncludeSubDomains = true;
            options.Preload = true;
        });

        services.Configure<CookiePolicyOptions>(options =>
        {
            options.Secure = CookieSecurePolicy.Always;
            options.HttpOnly = HttpOnlyPolicy.Always;
            options.MinimumSameSitePolicy = SameSiteMode.Lax;
        });

        var orchardBuilder = services.AddOrchardCms();

        orchardBuilder
            .AddSetupFeatures("OrchardCore.AutoSetup")
            .AddTenantFeatures(
                "OrchardCore.Redis",
                "OrchardCore.Redis.Cache",
                "OrchardCore.Redis.Lock",
                "OrchardCore.Redis.DataProtection"
            );
    }
}

Dependencies

  • OrchardCore.Application.Cms.Targets 3.0.0-preview-18841
  • OrchardCore.Redis 3.0.0-preview-18841

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions