Skip to content

How to ignore or block some features? #71

@ASADeveloper

Description

@ASADeveloper

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions