mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-09-12 21:37:53 -04:00
20 lines
624 B
C#
20 lines
624 B
C#
using Cleanuparr.Persistence.Models.Configuration.General;
|
|
|
|
namespace Cleanuparr.Api.Features.General.Contracts.Requests;
|
|
|
|
public sealed record UpdateAuthConfigRequest
|
|
{
|
|
public bool DisableAuthForLocalAddresses { get; init; }
|
|
|
|
public bool TrustForwardedHeaders { get; init; }
|
|
|
|
public List<string> TrustedNetworks { get; init; } = [];
|
|
|
|
public void ApplyTo(AuthConfig existingConfig)
|
|
{
|
|
existingConfig.DisableAuthForLocalAddresses = DisableAuthForLocalAddresses;
|
|
existingConfig.TrustForwardedHeaders = TrustForwardedHeaders;
|
|
existingConfig.TrustedNetworks = TrustedNetworks;
|
|
}
|
|
}
|