persist data protection keys in etv config folder (#1585)
This commit is contained in:
@@ -4,8 +4,13 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- Add `show_studio` to search index for seasons and episodes
|
||||
|
||||
### Fixed
|
||||
- Fix antiforgery error caused by reusing existing browser tabs across docker container restarts
|
||||
- Data protection keys will now be persisted under ErsatzTV's config folder instead of being recreated at startup
|
||||
|
||||
## [0.8.5-beta] - 2024-01-30
|
||||
### Added
|
||||
- Respect browser's `Accept-Language` header for date time display
|
||||
|
||||
@@ -15,6 +15,8 @@ public static class FileSystemLayout
|
||||
Environment.SpecialFolderOption.Create),
|
||||
"etv-transcode");
|
||||
|
||||
public static readonly string DataProtectionFolder = Path.Combine(AppDataFolder, "data-protection");
|
||||
|
||||
public static readonly string LogsFolder = Path.Combine(AppDataFolder, "logs");
|
||||
|
||||
public static readonly string DatabasePath = Path.Combine(AppDataFolder, "ersatztv.sqlite3");
|
||||
|
||||
@@ -71,6 +71,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -132,6 +133,8 @@ public class Startup
|
||||
configuration.ReleaseStage = bugsnagConfig.Enable ? "public" : "private";
|
||||
#endif
|
||||
});
|
||||
|
||||
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(FileSystemLayout.DataProtectionFolder));
|
||||
|
||||
OidcHelper.Init(Configuration);
|
||||
JwtHelper.Init(Configuration);
|
||||
|
||||
Reference in New Issue
Block a user