Skip to content

How to restrict a route access for IP addresses? #1735

Pinned Answered by raman-m
ShaonDey asked this question in Q&A
Discussion options

You must be logged in to vote

Is there any feature to restrict a route so that only specific IP addresses will be able to access it?

@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 …

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
3 replies
@ShaonDey
Comment options

@ggnaegi
Comment options

@raman-m
Comment options

Comment options

You must be logged in to vote
2 replies
@ShaonDey
Comment options

@raman-m
Comment options

Comment options

You must be logged in to vote
6 replies
@raman-m
Comment options

@ShaonDey
Comment options

@raman-m
Comment options

@ShaonDey
Comment options

@raman-m
Comment options

Answer selected by raman-m
Comment options

You must be logged in to vote
2 replies
@ShaonDey
Comment options

@raman-m
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Initially seen a question could become a new feature or bug or closed ;) Security Options Ocelot feature: Security Options
3 participants
Converted from issue

This discussion was converted from issue #1734 on October 16, 2023 09:23.