Ocelot 23.4.3

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
13
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
14
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
15
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
16
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
17
Ocelot.Provider.Consul
Provides Ocelot extensions to use Consul
18
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
12
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
13
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
14
Ocelot.Provider.Polly
Provides Ocelot extensions to use Polly.NET
15

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