You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
:heart: A heartfelt "Thank You" to **[Guillaume Gnaegi](https://github.com/ggnaegi)** (@ggnaegi)
16
7
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 <ahref="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
varcommitsHistory=GitHelper($"log --no-merges --date=format:\"%A, %B %d at %H:%M\" --pretty=format:\"- <sub>%h by **%aN** on %ad →</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
// var commitsHistory = GitHelper($"log --no-merges --date=format:\"%A, %B %d at %H:%M\" --pretty=format:\"- <sub>%h by **%aN** on %ad →</sub>%n %s\" {lastRelease}..HEAD");
Copy file name to clipboardExpand all lines: docs/features/routing.rst
+38-18
Original file line number
Diff line number
Diff line change
@@ -385,22 +385,31 @@ Consider the following 2 development scenarios :htm:`→`
385
385
Security Options [#f5]_
386
386
-----------------------
387
387
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:
404
413
405
414
.. code-block:: json
406
415
@@ -412,9 +421,17 @@ The current patterns managed are the following:
412
421
}
413
422
}
414
423
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
+
415
432
.. _routing-dynamic:
416
433
417
-
Dynamic Routing [#f6]_
434
+
Dynamic Routing [#f7]_
418
435
----------------------
419
436
420
437
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.
426
443
.. [#f3] ":ref:`routing-upstream-host`" feature was requested as part of issue `216`_.
427
444
.. [#f4] ":ref:`routing-upstream-headers`" feature was proposed in issue `360`_, and released in version `23.3`_.
428
445
.. [#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`.
.. _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.
@@ -25,23 +26,23 @@ Welcome to the Ocelot `23.4`_ documentation!
25
26
26
27
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.
27
28
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.
29
30
30
-
.... admonition:: Patches
31
+
.. admonition:: Patches
31
32
32
-
..- `23.3.3`_, on Jun 11, 2024. Technical release with DevOps patch.
33
+
- `23.4.1`_, on Nov 22, 2024: Routing patch.
33
34
34
35
.. _release-notes:
35
36
36
37
📢 Release Notes
37
38
-----------------
38
39
39
40
|Release Tag: `23.4.0`_
40
-
|Release Codename: `Make Guillaume Great Again! <https://github.com/ThreeMammals/Ocelot/commits?author=ggnaegi>`_
- **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.
45
46
- **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>`_?
46
47
- **for black men**: Here are some highlights of Donald's antics aka Mr. D:
0 commit comments