Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
[Bb]uild[Ll]og.*
/src/Core/Properties/launchSettings.json
9 changes: 8 additions & 1 deletion src/Core/Extensions/Ws.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
Expand Down Expand Up @@ -39,7 +40,13 @@ internal static async Task ExecuteWsProxyOperationAsync(this HttpContext context
foreach (var headerEntry in context.Request.Headers)
{
if (!Helpers.WebSocketNotForwardedHeaders.Contains(headerEntry.Key, StringComparer.OrdinalIgnoreCase))
socketToEndpoint.Options.SetRequestHeader(headerEntry.Key, headerEntry.Value);
{
if (!WebHeaderCollection.IsRestricted(headerEntry.Key))
{
socketToEndpoint.Options.SetRequestHeader(headerEntry.Key, headerEntry.Value);
}
}

}

if(options?.BeforeConnect != null)
Expand Down