ThreeMammals / Ocelot

.NET API Gateway
https://www.nuget.org/packages/Ocelot
MIT License
8.4k stars 1.64k forks source link

Upgrading to .NET Core 3.1 and Ocelot 16.0.1 breaks https downstream #1378

Closed draxtor closed 8 months ago

draxtor commented 4 years ago

Expected Behavior

We were upgrading our application using Ocelot gateway from .net core 2.2 to 3.1. Together with .Net core we upgraded Ocelot as well. We also renamed ReRoutes to Routes in our configuration files. Expected behavior was that everything is running smoothly in upgraded version.

Actual Behavior

We started to receive 404 errors for our services. Once we change it to http it started to work.

Steps to Reproduce the Problem

  1. Create .net core services running on HTTPS
  2. Create routes in ocelot
    {
    "Routes": [
    {
      "DownstreamPathTemplate": "/api/funds",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 5004
        }
      ],
      "UpstreamPathTemplate": "/api/funds",
      "UpstreamHttpMethod": [ "GET" ]
    }
    ]
    }
  3. Run the example in postman and it fails

Changing DownstreamScheme to http (and of course turning off https in services) made it work

Specifications

We are under corporate firewall and 90% is probability that it is caused by it, but everything works on the same computer running 2.2 .net core and ocelot 13.5.2.

That's why I'm wondering if someone has general idea what's going on? Any idea would be cool.

Consider this more like Q&A than opening an issue to be fixed.

raman-m commented 8 months ago

Do you still need an answer?

raman-m commented 8 months ago

Please, upgrade your app with Ocelot reference to version 23.1+, and report once again if required.