Search code examples
.net-coreswaggerocelot

TypeError: Failed to execute 'fetch' on 'Window': Failed to parse URL


I'm using MMLib.SwaggerForOcelot for gateway. in .Net core

enter image description here

I got this error. Any idea?

My Upstream and DownStream:

"SwaggerEndPoints": [
    {
      "Key": "skIndustry",
      "Config": [
        {
          "Name": "Industry API",
          "Version": "v1",
          "Url": "http://industryapi:80/swagger/v1/swagger.json"

        }
      ]
    }
]

My ReRoutes:

"ReRoutes": [
    {
      "DownstreamPathTemplate": "/{everything}",
      "DownstreamScheme": "http",
      "DownstreamHostAndPorts": [
        {
          "Host": "industryapi/",
          "Port": 80
        }
      ],
      "UpstreamPathTemplate": "/Industry/{everything}",
      "UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
      "SwaggerKey": "skIndustry"
    }
]

Thanks, Croos.


Solution

  • Please try new version 1.3.1.

    This PR probably solve similar problem.