Skip to content

Commit a79ae8a

Browse files
committed
Release 23.4.1 | Routing patch | November'24 release | +semver: patch (#2215)
* Update docs * Update build script
1 parent 7a3771b commit a79ae8a

File tree

5 files changed

+71
-70
lines changed

5 files changed

+71
-70
lines changed

ReleaseNotes.md

+10-30
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
1-
## :twisted_rightwards_arrows: Routing Update (version {0}) aka [MGGA](https://github.com/ThreeMammals/Ocelot/commits?author=ggnaegi) release
2-
> Codenamed: **[Make Guillaume Great Again!](https://github.com/ThreeMammals/Ocelot/commits?author=ggnaegi)**
3-
> Read the Docs: [Ocelot {0}](https://ocelot.readthedocs.io/en/{0}/)
1+
## :package: Routing patch (version {0})
2+
> Read the Docs: [Ocelot 23.4](https://ocelot.readthedocs.io/en/{0}/) with [PDF](https://ocelot.readthedocs.io/_/downloads/en/{0}/pdf/)
3+
> Hot fixed version: [{1}](https://github.com/ThreeMammals/Ocelot/releases/tag/{1})
4+
> Milestone: [November'24](https://github.com/ThreeMammals/Ocelot/milestone/10)
45
5-
### :information_source: About
6-
This minor release significantly upgrades the [Routing](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/routing.rst) feature by supporting [embedded placeholders](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/routing.rst#embedded-placeholders-1) within path segments (between slashes). Additionally, the team has focused on enhancing the performance of `Regex` objects.
7-
8-
### :new: What's new?
9-
- **[Routing](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/routing.rst)**: Introducing the new "[Embedded Placeholders](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/routing.rst#embedded-placeholders-1)" feature by @ggnaegi.
10-
As of November 2024, Ocelot was unable to process multiple [placeholders](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/routing.rst#placeholders) embedded between two forward slashes. It was also challenging to differentiate the placeholder from other elements within the slashes. For example, `/{{url}}-2/` for `/y-2/` would yield `{{url}} = y-2`. We are excited to introduce an enhanced method for evaluating placeholders that allows for the resolution of [placeholders](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/routing.rst#placeholders) within complex URLs.
11-
For additional information, refer to PR #2200.
12-
13-
### :up: Focus On
14-
<details>
15-
<summary><b>Features</b>: Routing, Core, Rate Limiting, Middleware Injection</summary>
6+
:heart: A heartfelt "Thank You" to **[Guillaume Gnaegi](https://github.com/ggnaegi)** (@ggnaegi)
167

17-
- [Routing](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/routing.rst): The new feature is "[Embedded Placeholders](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/routing.rst#embedded-placeholders-1)" by @ggnaegi.
18-
- [Core](https://github.com/ThreeMammals/Ocelot/labels/Core): All `Regex` logic has been refactored by @EngRajabi.
19-
The Ocelot Core now boasts improved performance of `Regex` objects, striving to adhere to the [Best Practices for Regular Expressions in .NET](https://docs.microsoft.com/en-us/dotnet/standard/base-types/best-practices). It is estimated that each request could save from 1 to over 10 microseconds in processing time (though no benchmarks have been developed to measure this).
20-
- [Rate Limiting](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/ratelimiting.rst): The persistent issue with [Rate Limiting headers](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/ratelimiting.rst#global-configuration:~:text=headers) has been resolved by @jlukawska.
21-
The problem was the absence of unofficial `X-Rate-Limit-*` headers (found in the [RateLimitingHeaders](https://github.com/ThreeMammals/Ocelot/blob/{0}/src/Ocelot/RateLimiting/RateLimitingHeaders.cs) class) in the `RateLimitingMiddleware`'s response. For more details, see PR #1307.
22-
Note that these unofficial headers have not yet been documented, so they may be subject to change since [Ocelot's RateLimiting headers do not align with industry standards, see links](https://github.com/ThreeMammals/Ocelot/blob/27d3df2d0fdfbf5acde12d9442dfc08836e8b982/src/Ocelot/RateLimiting/RateLimitingHeaders.cs#L6).
23-
- [Middleware Injection](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/middlewareinjection.rst): The `OcelotPipelineConfiguration.ClaimsToHeadersMiddleware` property has been introduced by @kesskalli.
24-
This new property enables the overriding of the [ClaimsToHeadersMiddleware](https://github.com/ThreeMammals/Ocelot/blob/{0}/docs/features/middlewareinjection.rst#middleware-injection:~:text=ClaimsToHeadersMiddleware). For additional information, refer to PR #1403.
25-
</details>
26-
27-
<details>
28-
<summary><b>Documentation</b> for <a href="https://ocelot.readthedocs.io/en/{0}/">v{0}</a></summary>
29-
30-
- [Routing](https://ocelot.readthedocs.io/en/{0}/features/routing.html): Introducing a new section on [Embedded Placeholders](https://ocelot.readthedocs.io/en/{0}/features/routing.html#embedded-placeholders)
31-
- [Middleware Injection](https://ocelot.readthedocs.io/en/{0}/features/middlewareinjection.html): Documentation now includes the [ClaimsToHeadersMiddleware](https://ocelot.readthedocs.io/en/{0}/features/middlewareinjection.html#middleware-injection:~:text=ClaimsToHeadersMiddleware) feature
32-
</details>
8+
### :information_source: About
9+
Addressed issues:
10+
- #2165
11+
- #2209
12+
- #2212

build.cake

+14-14
Original file line numberDiff line numberDiff line change
@@ -367,20 +367,20 @@ Task("CreateReleaseNotes")
367367
}
368368
return log;
369369
} // END of IterateCommits
370-
releaseNotes.Add("### Honoring :medal_sports: aka Top Contributors :clap:");
371-
releaseNotes.AddRange(topContributors.Take(3)); // Top 3 only, disabled 'breaker' logic
372-
releaseNotes.Add("");
373-
releaseNotes.Add("### Starring :star: aka Release Influencers :bowtie:");
374-
releaseNotes.AddRange(starring);
375-
releaseNotes.Add("");
376-
releaseNotes.Add($"### Features in Release {releaseVersion}");
377-
releaseNotes.Add("");
378-
releaseNotes.Add("<details><summary>Logbook</summary>");
379-
releaseNotes.Add("");
380-
var commitsHistory = GitHelper($"log --no-merges --date=format:\"%A, %B %d at %H:%M\" --pretty=format:\"- <sub>%h by **%aN** on %ad &rarr;</sub>%n %s\" {lastRelease}..HEAD");
381-
releaseNotes.AddRange(commitsHistory);
382-
releaseNotes.Add("</details>");
383-
releaseNotes.Add("");
370+
// releaseNotes.Add("### Honoring :medal_sports: aka Top Contributors :clap:");
371+
// releaseNotes.AddRange(topContributors.Take(3)); // Top 3 only, disabled 'breaker' logic
372+
// releaseNotes.Add("");
373+
// releaseNotes.Add("### Starring :star: aka Release Influencers :bowtie:");
374+
// releaseNotes.AddRange(starring);
375+
// releaseNotes.Add("");
376+
// releaseNotes.Add($"### Features in Release {releaseVersion}");
377+
// releaseNotes.Add("");
378+
// releaseNotes.Add("<details><summary>Logbook</summary>");
379+
// releaseNotes.Add("");
380+
// var commitsHistory = GitHelper($"log --no-merges --date=format:\"%A, %B %d at %H:%M\" --pretty=format:\"- <sub>%h by **%aN** on %ad &rarr;</sub>%n %s\" {lastRelease}..HEAD");
381+
// releaseNotes.AddRange(commitsHistory);
382+
// releaseNotes.Add("</details>");
383+
// releaseNotes.Add("");
384384
WriteReleaseNotes();
385385
});
386386

docs/features/routing.rst

+38-18
Original file line numberDiff line numberDiff line change
@@ -385,22 +385,31 @@ Consider the following 2 development scenarios :htm:`&rarr;`
385385
Security Options [#f5]_
386386
-----------------------
387387

388-
Ocelot allows you to manage multiple patterns for allowed/blocked IPs using the `IPAddressRange <https://github.com/jsakamoto/ipaddressrange>`_ package
389-
with `MPL-2.0 License <https://github.com/jsakamoto/ipaddressrange/blob/master/LICENSE>`_.
390-
391-
This feature is designed to allow greater IP management in order to include or exclude a wide IP range via CIDR notation or IP range.
392-
The current patterns managed are the following:
393-
394-
* Single IP: :code:`192.168.1.1`
395-
* IP Range: :code:`192.168.1.1-192.168.1.250`
396-
* IP Short Range: :code:`192.168.1.1-250`
397-
* IP Range with subnet: :code:`192.168.1.0/255.255.255.0`
398-
* CIDR: :code:`192.168.1.0/24`
399-
* CIDR for IPv6: :code:`fe80::/10`
400-
* The allowed/blocked lists are evaluated during configuration loading
401-
* The **ExcludeAllowedFromBlocked** property is intended to provide the ability to specify a wide range of blocked IP addresses and allow a subrange of IP addresses.
402-
Default value: :code:`false`
403-
* The absence of a property in **SecurityOptions** is allowed, it takes the default value.
388+
Ocelot enables the management of multiple patterns for allowed and blocked IPs using the `IPAddressRange <https://github.com/jsakamoto/ipaddressrange>`_ package, which is licensed under the `MPL-2.0 license <https://github.com/jsakamoto/ipaddressrange/blob/master/LICENSE>`_.
389+
390+
This feature is designed to enhanced IP management, allowing for the inclusion exclusion of a broad IP range through CIDR notation or specific IP ranges.
391+
The current managed patterns are as follows:
392+
393+
.. list-table::
394+
:widths: 35 65
395+
:header-rows: 1
396+
397+
* - *IP Rule*
398+
- *Example*
399+
* - Single IP
400+
- ``192.168.1.1``
401+
* - IP Range
402+
- ``192.168.1.1-192.168.1.250``
403+
* - IP Short Range
404+
- ``192.168.1.1-250``
405+
* - IP Subnet
406+
- ``192.168.1.0/255.255.255.0``
407+
* - CIDR IPv4
408+
- ``192.168.1.0/24``
409+
* - CIDR IPv6
410+
- ``fe80::/10``
411+
412+
Here is a quick example:
404413

405414
.. code-block:: json
406415
@@ -412,9 +421,17 @@ The current patterns managed are the following:
412421
}
413422
}
414423
424+
Please **note** that:
425+
426+
* The allowed/blocked lists are evaluated during configuration loading
427+
* The ``ExcludeAllowedFromBlocked`` property is intended to provide the ability to specify a wide range of blocked IP addresses and allow a subrange of IP addresses.
428+
Default value: :code:`false`
429+
* The absence of a property in *Security Options* is allowed, it takes the default value.
430+
* The *Security Options* can be configured **globally** in the ``GlobalConfiguration`` JSON; however, it is ignored if overriding options are specified at the route level [#f6]_.
431+
415432
.. _routing-dynamic:
416433

417-
Dynamic Routing [#f6]_
434+
Dynamic Routing [#f7]_
418435
----------------------
419436

420437
The idea is to enable dynamic routing when using a :doc:`../features/servicediscovery` provider so you don't have to provide the Route config.
@@ -426,7 +443,8 @@ See the :ref:`sd-dynamic-routing` docs if this sounds interesting to you.
426443
.. [#f3] ":ref:`routing-upstream-host`" feature was requested as part of issue `216`_.
427444
.. [#f4] ":ref:`routing-upstream-headers`" feature was proposed in issue `360`_, and released in version `23.3`_.
428445
.. [#f5] ":ref:`routing-security-options`" feature was requested as part of issue `628`_ (version `12.0.1`_), then redesigned and improved by issue `1400`_, and published in version `20.0`_ docs.
429-
.. [#f6] ":ref:`routing-dynamic`" feature was requested as part of issue `340`_. Refer to complete reference: :ref:`sd-dynamic-routing`.
446+
.. [#f6] Global ":ref:`routing-security-options`" feature was requested as part of issue `2165`_ , and released in version `23.4.1`_.
447+
.. [#f7] ":ref:`routing-dynamic`" feature was requested as part of issue `340`_. Refer to complete reference: :ref:`sd-dynamic-routing`.
430448
431449
.. _model binding: https://learn.microsoft.com/en-us/aspnet/core/mvc/models/model-binding?view=aspnetcore-8.0#collections
432450
.. _Bind arrays and string values from headers and query strings: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/parameter-binding?view=aspnetcore-8.0#bind-arrays-and-string-values-from-headers-and-query-strings
@@ -441,10 +459,12 @@ See the :ref:`sd-dynamic-routing` docs if this sounds interesting to you.
441459
.. _952: https://github.com/ThreeMammals/Ocelot/issues/952
442460
.. _1174: https://github.com/ThreeMammals/Ocelot/issues/1174
443461
.. _1400: https://github.com/ThreeMammals/Ocelot/issues/1400
462+
.. _2165: https://github.com/ThreeMammals/Ocelot/issues/2165
444463
.. _2199: https://github.com/ThreeMammals/Ocelot/issues/2199
445464

446465
.. _12.0.1: https://github.com/ThreeMammals/Ocelot/releases/tag/12.0.1
447466
.. _20.0: https://github.com/ThreeMammals/Ocelot/releases/tag/20.0.0
448467
.. _23.0: https://github.com/ThreeMammals/Ocelot/releases/tag/23.0.0
449468
.. _23.3: https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.0
450469
.. _23.4: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.0
470+
.. _23.4.1: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.1

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _23.4: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.0
1+
.. _23.4: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.1
22

33
############################
44
Ocelot `23.4`_ Documentation

docs/releasenotes.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
.. _@jlukawska: https://github.com/jlukawska
55
.. _@kesskalli: https://github.com/kesskalli
66

7-
.. _23.4: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.0
7+
.. _23.4: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.1
88
.. _23.4.0: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.0
9+
.. _23.4.1: https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.1
910

1011
.. _1111: https://github.com/ThreeMammals/Ocelot/issues/1111
1112
.. _1307: https://github.com/ThreeMammals/Ocelot/pull/1307
@@ -25,23 +26,23 @@ Welcome to the Ocelot `23.4`_ documentation!
2526

2627
It is recommended to read all :ref:`release-notes` if you have deployed the Ocelot app in a production environment and are planning to upgrade to major or patched versions.
2728

28-
.. The major version `23.4.0`_ includes several patches, the history of which is provided below.
29+
The major version `23.4.0`_ includes several patches, the history of which is provided below.
2930

30-
.. .. admonition:: Patches
31+
.. admonition:: Patches
3132

32-
.. - `23.3.3`_, on Jun 11, 2024. Technical release with DevOps patch.
33+
- `23.4.1`_, on Nov 22, 2024: Routing patch.
3334

3435
.. _release-notes:
3536

3637
📢 Release Notes
3738
-----------------
3839

3940
| Release Tag: `23.4.0`_
40-
| Release Codename: `Make Guillaume Great Again! <https://github.com/ThreeMammals/Ocelot/commits?author=ggnaegi>`_
41+
| Release Codename: `McDonald's <https://www.youtube.com/watch?v=_PgYAPdOs9M>`_
4142
42-
:htm:`<details><summary>With codename decoding links:</summary>`
43+
:htm:`<details><summary>With release jokes:</summary>`
4344

44-
- **for men**: The abbreviation "MGGA" is reminiscent of the `MAGA slogan <https://www.bing.com/search?q=make+america+great+again+slogan>`_
45+
- **for men**: Wearing a cap with the `MAGA slogan <https://www.bing.com/search?q=make+america+great+again+slogan>`_ is encouraged when visiting McDonald's.
4546
- **for women**: Donald is fond of caps, particularly the `MAGA cap <https://www.bing.com/search?q=make+america+great+again+cap>`_, and it's amusing to see children's reactions when `We Ask Kids How Mr.D is Doing <https://www.youtube.com/watch?v=XYviM5xevC8>`_?
4647
- **for black men**: Here are some highlights of Donald's antics aka Mr. D:
4748

0 commit comments

Comments
 (0)