fix exception error when header settings mismatch
This commit is contained in:
Родитель
0a9cd5119a
Коммит
1ff71b3ffc
|
@ -13,6 +13,8 @@ namespace EasyAuthForK8s.Sample.Pages
|
|||
_logger = logger;
|
||||
}
|
||||
public void OnGet(string? encoding, string? format, string? prefix)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(encoding))
|
||||
Encoding = encoding!;
|
||||
|
@ -39,6 +41,11 @@ namespace EasyAuthForK8s.Sample.Pages
|
|||
|
||||
Headers.AddRange(headers.ToList());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Do nothing, just don't throw an exception.
|
||||
}
|
||||
}
|
||||
public List<KeyValuePair<string, string>> Headers = new();
|
||||
public string Encoding = "UrlEncode";
|
||||
public string Format = "Separate";
|
||||
|
|
Загрузка…
Ссылка в новой задаче