I have a problem with running my project using docker on mac.
the problem lies while invoking the endpoint that sets the session
I get two warnings when running the project
first warning:
Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60] Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
second warning
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] No XML encryptor configured. Key {25ffec84-775f-44d0-9dce-5b4824e3fbf2} may be persisted to storage in unencrypted form.
Session Settings
services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(12);//We set Time here
options.Cookie.Name = "MySession";
options.Cookie.HttpOnly = true;
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
options.Cookie.SameSite = SameSiteMode.Strict;
options.Cookie.IsEssential = true;
})
somone have idea how i can resolve that ?