-
SpecificationsTargetFramework: DescriptionIs there any feature to restrict a route so that only specific IP addresses will be able to access it? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
Hi Shaon!
Actually you're using Ocelot v18.0 if your target framework is If you use Ocelot v17.0.0 then target framework is You should be more specific in providing version information. 😉 |
Beta Was this translation helpful? Give feedback.
-
net6.0You need to use SecurityOptions of the route configuration. This is undocumented feature because the authors were lazy in describing this feature in docs. 😏 See Security Options history! So, basic support of Security Options was added in this commit 4a8f4c2. And this feature belongs to versions 12.0.1+, so the security feature belongs to Ocelot 17.0.0+, but it is not documented. 🙉 net7.0In release 20.0 the Security Options feature was enhanced in PR #1399 by commit 5dbbbef:
The Security Options feature is documented in .rst-files already, but we have no ReadTheDocs build because of failure, and we are going to fix build problem soon in release 20.0 by making new 20.0.1 release in 1-2 days. Please watch for a new release! Finally,I would recommend you to migrate your solution to .NET 7 vs Ocelot v20.0 to use the Security Options feature. You will be able to restrict access for a route by a black list creation via the IPBlockedList array property in JSON. See more details in commit 5dbbbef plz. |
Beta Was this translation helpful? Give feedback.
-
@ShaonDey Don't you mind if your question will be pinned for a couple of future releases? But you're free to mark as answered. |
Beta Was this translation helpful? Give feedback.
@ShaonDey
net6.0
You need to use SecurityOptions of the route configuration. This is undocumented feature because the authors were lazy in describing this feature in docs. 😏 See Security Options history! So, basic support of Security Options was added in this commit 4a8f4c2. And this feature belongs to versions 12.0.1+, so the security feature belongs to Ocelot 17.0.0+, but it is not documented. 🙉
net7.0
In release 20.0 the Security Options feature was enhanced in PR #1399 by commit 5dbbbef:
The Security Options feature is documented in .rst-files already, but we have no …