Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Upgrade Kestrel 1.1.0 submit POST not responded on behind NGINX with websocket supported #1263

Closed
@thohng

Description

@thohng

Our services work fine with Kestrel 1.0.0 and 1.0.1 before. We also use Microsoft.AspNetCore.SignalR.Server 0.1.0

Got issue when upgrade Kestrel to 1.1.0.

Workaround:

  • downgrade to Kestrel 1.0.2
  • or proxy_set_header Connection $http_connection;

Further investigation:

  • Change proxy_set_header Connection keep-alive; then Kestrel 1.1.0 works but websocket not work.
  • Ajax POST (json) not get the issue
  • ASP.NET pages POST (Form data, Content-Type: application/x-www-form-urlencoded) with content result not get the issue.
  • Only ASP.NET pages POST (Form data) with redirect result get the issue.

NGINX 1.10.0 / Ubuntu 16.04:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''   '';
}

map $http_x_forwarded_proto $thescheme {
	default $scheme;
	https https;
}

proxy_pass				http://localhost:5000/;
proxy_set_header Host 			$host;
proxy_set_header X-Real-IP 		$remote_addr;
proxy_set_header X-Forwarded-Host       $http_host;
proxy_set_header X-Forwarded-Proto	$thescheme;
proxy_set_header X-Forwarded-For        $proxy_add_x_forwarded_for;
proxy_http_version                      1.1;
proxy_set_header Upgrade                $http_upgrade;
proxy_set_header Connection             "upgrade";
"frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.1.0",
          "type": "platform"
        }
      },
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions