Ocelot 23.4.0

Ocelot Logo

CircleCI

About

Ocelot is a .NET API Gateway. This project is aimed at people using .NET running a microservices / service-oriented architecture that need a unified point of entry into their system. However it will work with anything that speaks HTTP(S) and run on any platform that ASP.NET Core supports.

In particular we want easy integration with IdentityServer reference and Bearer tokens. We have been unable to find this in our current workplace without having to write our own Javascript middlewares to handle the IdentityServer reference tokens. We would rather use the IdentityServer code that already exists to do this.

Ocelot is a bunch of middlewares in a specific order.

Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware, where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is retrieved as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features!

Features

A quick list of Ocelot's capabilities, for more information see the Documentation.

Install

Ocelot is designed to work with ASP.NET Core and it targets net6.0, net7.0 and net8.0 frameworks. 4

Install Ocelot package and its dependencies using NuGet Package Manager:

Install-Package Ocelot

Or via the .NET CLI:

dotnet add package Ocelot

All versions can be found on nuget.

Documentation

  • Ocelot documentation — Read the Docs
    This includes lots of information and will be helpful if you want to understand the features Ocelot currently offers.
  • Ocelot RST Docs
    This includes source code of documentation as .rst files which are up to date for current development.

Coming up

You can see what we are working on in backlog.

Contributing

We love to receive contributions from the community, so please keep them coming :octocat:
Pull requests, issues and commentary welcome!

Please complete the relevant template for issues and PRs. Sometimes it's worth getting in touch with us to discuss changes before doing any work in case this is something we are already doing or it might not make sense. We can also give advice on the easiest way to do things :octocat:

Finally, we mark all existing issues as label: help wanted label: small effort label: medium effort label: large effort. 5
If you want to contribute for the first time, we suggest looking at a label: help wanted label: small effort label: good first issue :octocat:

Notes


  1. Ocelot doesn’t directly support GraphQL. Developers can easily integrate the GraphQL for .NET library.

  2. Ocelot does support Consul, Netflix Eureka, Service Fabric service discovery providers, and special modes like Dynamic Routing and Custom Providers.

  3. Retry policies only via Polly library.

  4. Starting with v21.0, the solution's code base supports Multitargeting as SDK-style projects. It should be easier for teams to move between (migrate to) .NET 6, 7 and 8 frameworks. Also, new features will be available for all .NET SDKs which we support via multitargeting. Find out more here: Target frameworks in SDK-style projects

  5. See all labels of the repository.

Showing the top 20 packages that depend on Ocelot.

Packages Downloads
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
7
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
9
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
11
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
12
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
7
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
8
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
9
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
10

Version Downloads Last updated
23.4.2 4 12/02/2024
23.4.1 3 12/12/2024
23.4.0 5 11/29/2024
23.3.6 5 11/17/2024
23.3.4 3 11/14/2024
23.3.3 1 12/12/2024
23.3.0 7 11/14/2024
23.2.2 11 05/26/2024
23.2.0 5 05/04/2024
23.1.0 5 05/06/2024
23.0.0 6 05/01/2024
22.0.1 4 12/02/2024
22.0.0 3 11/29/2024
21.0.0 6 05/05/2024
20.0.0 8 05/08/2024
19.0.4 4 11/24/2024
19.0.3 1 12/09/2024
19.0.2 6 05/05/2024
19.0.1 4 12/06/2024
19.0.0 2 12/09/2024
18.0.0 9 04/30/2024
17.0.1 3 12/06/2024
17.0.0 10 09/19/2022
16.0.2 8 05/10/2024
16.0.1 4 12/02/2024
16.0.0 5 12/02/2024
15.0.7 5 05/07/2024
15.0.1 4 05/04/2024
15.0.0 5 11/25/2024
14.1.3 8 05/01/2024
14.1.2 4 12/04/2024
14.1.1 11 05/08/2024
14.0.12 5 05/30/2024
14.0.8 5 05/07/2024
14.0.5 10 05/08/2024
14.0.2 5 05/01/2024
14.0.0 4 12/11/2024
13.9.0-alpha0115 4 12/03/2024
13.8.2 7 05/03/2024
13.8.0-alpha0018 4 05/05/2024
13.8.0-alpha0008 5 05/04/2024
13.8.0-alpha0006 9 05/08/2024
13.7.0-alpha0011 8 05/04/2024
13.7.0-alpha0009 7 05/04/2024
13.7.0-alpha0008 10 05/02/2024
13.7.0-alpha0006 12 05/06/2024
13.6.0-alpha0014 9 05/02/2024
13.6.0-alpha0010 9 05/05/2024
13.6.0-alpha0008 6 05/15/2024
13.6.0-alpha0006 15 04/09/2024
13.5.2 7 05/02/2024
13.5.0-alpha0056 8 05/01/2024
13.2.0-alpha0034 1 12/10/2024
13.2.0-alpha0033 7 05/03/2024
13.2.0-alpha0030 4 05/07/2024
13.2.0-alpha0026 6 05/04/2024
13.2.0-alpha0020 7 05/05/2024
13.2.0-alpha0009 4 12/02/2024
13.2.0-alpha0003 4 11/29/2024
13.2.0-alpha0001 6 05/06/2024
12.1.0-unstable0001 1 12/08/2024
12.1.0-alpha0027 6 05/05/2024
12.1.0-alpha0024 8 05/05/2024
12.0.0-unstable0014 8 05/05/2024
11.1.0-unstable0007 5 05/06/2024
11.1.0-unstable0006 1 12/26/2024
11.0.3 5 05/26/2024
11.0.2 7 11/03/2024
11.0.1 8 05/26/2024
11.0.0 4 12/04/2024
10.1.0-unstable0017 2 11/22/2024
10.1.0-unstable0016 4 11/05/2024
10.1.0-unstable0013 4 12/03/2024
10.1.0-unstable0007 5 05/03/2024
10.1.0-unstable0005 6 05/29/2024
10.1.0-unstable0003 8 05/02/2024
10.0.3 3 05/02/2024
10.0.2 9 05/05/2024
10.0.0 8 05/24/2024
9.0.0-unstable0041 8 05/06/2024
8.1.0-unstable0031 6 05/01/2024
8.1.0-unstable0030 6 05/07/2024
8.1.0-unstable0029 7 05/01/2024
8.1.0-unstable0028 6 05/01/2024
8.1.0-unstable0027 7 05/06/2024
8.1.0-unstable0023 6 05/08/2024
8.1.0-unstable0022 14 04/09/2024
8.1.0-unstable0021 7 05/01/2024
8.1.0-unstable0020 7 05/10/2024
8.1.0-unstable0014 5 05/01/2024
8.1.0-unstable0010 5 11/12/2024
8.1.0-unstable0009 9 05/04/2024
8.1.0-unstable0005 6 05/14/2024
8.1.0-unstable0001 7 05/02/2024
8.0.4 4 05/25/2024
8.0.2 7 05/06/2024
8.0.0 6 05/04/2024
8.0.0-unstable0044 4 12/06/2024
7.1.0-unstable0042 3 11/30/2024
7.1.0-unstable0041 7 05/15/2024
7.1.0-unstable0037 9 05/01/2024
7.1.0-unstable0035 6 05/01/2024
7.1.0-unstable0029 7 05/03/2024
7.1.0-unstable0026 8 04/10/2024
7.1.0-unstable0025 7 05/07/2024
7.1.0-unstable0023 6 05/06/2024
7.1.0-unstable0020 9 05/05/2024
7.1.0-unstable0019 5 05/02/2024
7.1.0-unstable0017 5 05/26/2024
7.1.0-unstable0012 9 05/06/2024
7.1.0-unstable0009 5 05/04/2024
7.1.0-unstable0005 4 05/23/2024
7.0.4 5 05/07/2024
6.0.0-unstable0064 8 05/06/2024
5.6.0-unstable0032 4 12/09/2024
5.6.0-unstable0031 4 12/04/2024
5.6.0-unstable0029 9 05/06/2024
5.6.0-unstable0027 8 04/24/2024
5.6.0-unstable0024 7 05/04/2024
5.6.0-unstable0006 7 05/07/2024
5.5.2 4 05/07/2024
5.5.1 5 04/09/2024
5.3.0-unstable0004 4 12/06/2024
5.3.0-unstable0002 6 05/06/2024
5.2.0 7 05/01/2024
5.2.0-unstable0001 3 05/08/2024
5.1.0 5 05/10/2024
5.1.0-unstable0008 7 05/01/2024
5.1.0-unstable0006 7 05/02/2024
5.1.0-unstable0005 6 05/25/2024
5.0.1 4 05/06/2024
5.0.0 4 12/03/2024
4.1.0-unstable0001 6 05/07/2024
3.2.0-unstable0044 6 05/01/2024
3.2.0-unstable0033 4 05/04/2024
3.2.0-unstable0005 5 05/07/2024
3.1.5 8 05/07/2024
3.1.0-unstable0010 11 05/02/2024
3.1.0-unstable0005 7 05/01/2024
3.0.3 7 05/01/2024
3.0.2 9 04/24/2024
3.0.0 9 05/06/2024
2.1.0-unstable0051 5 05/07/2024
2.1.0-unstable0049 7 05/06/2024
2.1.0-unstable0043 5 05/04/2024
2.1.0-unstable0037 9 05/01/2024
2.0.11 7 05/02/2024
2.0.10 6 05/03/2024
2.0.6 8 05/01/2024
2.0.4 7 04/24/2024
2.0.3 7 05/04/2024
2.0.2 6 05/02/2024
2.0.1 6 05/01/2024
2.0.0 2 11/28/2024
1.5.0-unstable0158 8 05/06/2024
1.5.0-unstable0154 4 05/01/2024
1.5.0-unstable0131 4 10/31/2024
1.5.0-unstable0115 8 05/02/2024
1.5.0-unstable0071 8 05/08/2024
1.5.0-unstable0053 6 05/06/2024
1.5.0-unstable0043 6 04/30/2024
1.4.11 8 05/02/2024
1.4.10 8 05/02/2024
1.4.9 5 05/06/2024
1.4.7 6 05/05/2024
1.4.5 4 12/03/2024
1.4.1 6 05/07/2024
1.4.0-unstable0089 8 05/06/2024
1.4.0-unstable0058 8 04/30/2024
1.4.0-unstable0055 7 05/07/2024
1.4.0-unstable0026 6 05/04/2024
1.4.0-set-up-admin-api0001 7 05/21/2024
1.3.3-pullrequest0054 6 05/04/2024
1.3.2 9 05/06/2024
1.3.1 8 05/02/2024
1.3.0-unstable0002 8 05/05/2024
1.2.0-unstable0033 6 05/06/2024
1.1.0 5 11/14/2024
1.0.123 6 05/06/2024
1.0.117 3 11/21/2024
1.0.114-rc1 9 05/04/2024
1.0.112-rc1 10 05/01/2024
1.0.107-rc1 8 05/06/2024
1.0.101-rc1 7 05/05/2024
1.0.100-rc1 5 05/05/2024
1.0.98-rc1 1 12/11/2024
1.0.97-rc1 5 05/02/2024
1.0.95-rc1 1 12/18/2024
1.0.90-rc1 8 05/07/2024
1.0.87-rc1 2 11/28/2024
1.0.84-rc1 5 05/04/2024
1.0.83-rc1 4 05/06/2024
1.0.81-rc1 5 05/05/2024
1.0.78-rc1 5 05/01/2024
1.0.68-rc1 7 05/06/2024
1.0.66-rc2 6 05/06/2024
1.0.66-rc1 7 05/06/2024
0.0.13-rc1 8 05/04/2024
0.0.12-rc1 4 12/01/2024