Open Closed

Ocelot - ServiceDns #5926


User avatar
0
mmaldonado@emscltd.com created
  • ABP Framework version: 7.3.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

{ "ServiceKey": , "ServiceDns": , "DownstreamPathTemplate": "/api/product-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44361 } ], "UpstreamPathTemplate": "/api/product-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] },

is there any documentation about "ServiceDns" on ocelot configuration?


1 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    The ServiceKey is the unique service name to define the unique microservice names to show on the API definition section of swagger. The ServiceDns is the real dns you need to provide on deployment so the API definition can find the correct swagger.json of the related microservices.

    In the template we defined it as:

    {
      "ServiceKey": "Account Service",
      "ServiceDns": "https://authserver.myprojectname.dev",
      "DownstreamPathTemplate": "/api/account/{everything}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44322
        }
      ],
      "UpstreamPathTemplate": "/api/account/{everything}",
      "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
    },
    

    In version 7.4 we dropped Ocelot and started using YARP for gateways, so these properties are no longer used.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11