diff options
author | Rory& <root@rory.gay> | 2024-02-28 22:03:13 +0100 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-02-28 22:03:13 +0100 |
commit | 62adbbe75226de8cb14c3f468ad0dff1da91a702 (patch) | |
tree | 6a6c3706d39b439aa21a86a259a70ee8750a8ca5 /MatrixMediaGate/Program.cs | |
parent | Alternate media type handling (diff) | |
download | MatrixMediaGate-62adbbe75226de8cb14c3f468ad0dff1da91a702.tar.xz |
Alternate header handling for request headers
Diffstat (limited to '')
-rw-r--r-- | MatrixMediaGate/Program.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MatrixMediaGate/Program.cs b/MatrixMediaGate/Program.cs index 353858b..cef146f 100644 --- a/MatrixMediaGate/Program.cs +++ b/MatrixMediaGate/Program.cs @@ -27,7 +27,7 @@ async Task Proxy(HttpClient hc, ProxyConfiguration cfg, HttpContext ctx, ILogger using var req = new HttpRequestMessage(method, path); foreach (var header in ctx.Request.Headers) { if (header.Key != "Accept-Encoding" && header.Key != "Content-Type" && header.Key != "Content-Length") - req.Headers.Add(header.Key, header.Value.ToArray()); + req.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray()); } req.Headers.Host = cfg.Host; |