2021-06-03 13:43:46 +08:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace SimApi.Configs
|
|
|
|
|
{
|
|
|
|
|
public class SimApiOptions
|
|
|
|
|
{
|
2021-06-05 14:30:52 +08:00
|
|
|
public bool EnableCors { get; set; } = true;
|
2021-06-03 13:43:46 +08:00
|
|
|
public bool EnableSimApiAuth { get; set; } = false;
|
|
|
|
|
public bool EnableSimApiDoc { get; set; } = true;
|
|
|
|
|
public bool EnableSimApiException { get; set; } = true;
|
|
|
|
|
public bool EnableSimApiStorage { get; set; } = false;
|
|
|
|
|
public bool EnableForwardHeaders { get; set; } = true;
|
|
|
|
|
public bool EnableLowerUrl { get; set; } = true;
|
2021-06-28 05:36:54 +08:00
|
|
|
public bool EnableLogger { get; set; } = true;
|
2021-06-05 14:33:59 +08:00
|
|
|
public SimApiDocOptions SimApiDocOptions { get; set; } = new SimApiDocOptions();
|
|
|
|
|
public SimApiStorageOptions SimApiStorageOptions { get; set; } = new SimApiStorageOptions();
|
2021-06-03 13:43:46 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
public void ConfigureSimApiDoc(Action<SimApiDocOptions> options = null)
|
|
|
|
|
{
|
|
|
|
|
options?.Invoke(SimApiDocOptions);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ConfigureSimApiStorage(Action<SimApiStorageOptions> options = null)
|
|
|
|
|
{
|
|
|
|
|
options?.Invoke(SimApiStorageOptions);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|