Skip to content

Commit e214bcd

Browse files
committed
drop websocket hack
1 parent 2e4b588 commit e214bcd

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

KubeConnect/KubeConnect.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>
3737
<PackageReference Include="SSH.NET" Version="2020.0.2" />
38-
<PackageReference Include="Yarp.ReverseProxy" Version="1.1.1" />
38+
<PackageReference Include="Yarp.ReverseProxy" Version="2.0.0" />
3939
</ItemGroup>
4040

4141
</Project>

KubeConnect/Startup.cs

-15
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
3030
{
3131
app.UseRouting();
3232

33-
app.Use((context, nxt) =>
34-
{
35-
if (context.Request.Method == HttpMethods.Connect && context.Request.Protocol != "HTTP/1.1")
36-
{
37-
var resetFeature = context.Features.Get<IHttpResetFeature>();
38-
if (resetFeature != null)
39-
{
40-
//https://www.rfc-editor.org/rfc/rfc7540#page-51
41-
//HTTP_1_1_REQUIRED (0xd): The endpoint requires that HTTP/1.1 be used instead of HTTP/2.
42-
resetFeature.Reset(errorCode: 0xd);
43-
return Task.CompletedTask;
44-
}
45-
}
46-
return nxt();
47-
});
4833
app.UseEndpoints(endpoints =>
4934
{
5035
endpoints.MapReverseProxy();

0 commit comments

Comments
 (0)