about summary refs log tree commit diff
path: root/MatrixMediaGate/ProxyConfiguration.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-02-29 09:00:17 +0000
committerRory& <root@rory.gay>2024-02-29 09:00:17 +0000
commit8f10d01613e794c145f4d61fc50924a765d37f0e (patch)
treeb88e12359bae3a0fbb3bc5fb6a2e55cb94ae25ca /MatrixMediaGate/ProxyConfiguration.cs
parentAlternate header handling for request headers (diff)
downloadMatrixMediaGate-8f10d01613e794c145f4d61fc50924a765d37f0e.tar.xz
Dump failed requests
Diffstat (limited to '')
-rw-r--r--MatrixMediaGate/ProxyConfiguration.cs6
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