Added allowlist and denylist, fixed patchy configuration with proper options models, fixed api middleware authorization issues
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
using System.Configuration;
|
||||
using ElmahCore;
|
||||
using Shared.Models;
|
||||
|
||||
namespace Server.Models;
|
||||
|
||||
public class EmbeddingSearchOptions
|
||||
public class EmbeddingSearchOptions : ApiKeyOptions
|
||||
{
|
||||
public required ConnectionStringsSection ConnectionStrings { get; set; }
|
||||
public ElmahOptions? Elmah { get; set; }
|
||||
public required long EmbeddingCacheMaxCount { get; set; }
|
||||
public required AiProvider[] AiProviders { get; set; }
|
||||
public required Dictionary<string, AiProvider> AiProviders { get; set; }
|
||||
public required SimpleAuthOptions SimpleAuth { get; set; }
|
||||
public string[]? ApiKeys { get; set; }
|
||||
public required bool UseHttpsRedirection { get; set; }
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class AiProvider
|
||||
{
|
||||
public required string Handler { get; set; }
|
||||
public required string BaseURL { get; set; }
|
||||
public required string ApiKey { get; set; }
|
||||
public string? ApiKey { get; set; }
|
||||
public required string[] Allowlist { get; set; }
|
||||
public required string[] Denylist { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user