diff options
author | Rory& <root@rory.gay> | 2024-02-29 09:00:17 +0000 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-02-29 09:00:17 +0000 |
commit | 8f10d01613e794c145f4d61fc50924a765d37f0e (patch) | |
tree | b88e12359bae3a0fbb3bc5fb6a2e55cb94ae25ca /MatrixMediaGate/ProxyConfiguration.cs | |
parent | Alternate header handling for request headers (diff) | |
download | MatrixMediaGate-8f10d01613e794c145f4d61fc50924a765d37f0e.tar.xz |
Dump failed requests
Diffstat (limited to '')
-rw-r--r-- | MatrixMediaGate/ProxyConfiguration.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MatrixMediaGate/ProxyConfiguration.cs b/MatrixMediaGate/ProxyConfiguration.cs index ebe3509..ffb3555 100644 --- a/MatrixMediaGate/ProxyConfiguration.cs +++ b/MatrixMediaGate/ProxyConfiguration.cs @@ -2,12 +2,16 @@ namespace MatrixMediaGate; public class ProxyConfiguration { //bind to config - public ProxyConfiguration(IConfiguration configuration) + public ProxyConfiguration(IConfiguration configuration, IHostEnvironment env) { configuration.GetRequiredSection("ProxyConfiguration").Bind(this); + DumpPath ??= Path.Combine("data", env.EnvironmentName, "dumps"); + Directory.CreateDirectory(DumpPath); } public required string Upstream { get; set; } public required string Host { get; set; } public required List<string> TrustedServers { get; set; } + public required bool DumpFailedRequests { get; set; } + public required string? DumpPath { get; set; } } \ No newline at end of file |