Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to ignore or block some features? #71

Open
ASADeveloper opened this issue Sep 21, 2017 · 0 comments
Open

How to ignore or block some features? #71

ASADeveloper opened this issue Sep 21, 2017 · 0 comments

Comments

@ASADeveloper
Copy link

ASADeveloper commented Sep 21, 2017

Hi,

Did anyone manage to block/ignore some operators to protect the API?

For example to be able to do some of the ideas in this blog https://blogs.msdn.microsoft.com/webdev/2013/02/06/protect-your-queryable-api-with-the-validation-feature-in-asp-net-web-api-odata/

But it doesn't need to be very extensive.

I want to only allow StartsWith function in $filter and ignore/block SubstringOf.
One other case would be to only allow user to do OrderBy on some properties. (Otherwise probably all properties should have index in the database)

Any 'hacky' method is welcome, too!

By the way I've seen this very old issue #22 but it seems very old and forgotten. Maybe the new visitors see this issue better.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant