NamespaceSystemLibrary.Common.Framework.App.Attributes
Filters access based on Origin
header
Input:
`null`: Allows all`*`: Allows all
- A regex: Value must satisfy the regex pattern- A pipe separated list: Any part is within the Value in a case insensitive check
`text`: Value must match, case sensitive[OriginFilter(null)] // Allows all
[OriginFilter("*")] // Allows all
[OriginFilter("^[ab0-4]{4,}$")] // Allow origin containing `a, b, 0, 1, 2, 3 or 4` with a minimum length of 4
[OriginFilter("SystemLibrary\.com")] // Exact match of SystemLibrary.com, case sensitive
[OriginFilter("test.systemlibrary\.com|test2.systemlibrary.com")] // Allow origins containing test.systemlibrary.com or test2.systemlibrary.com, case insensitive
Remarks
Validating as a regex expression requires any of these characters: ^$*?[
Validate case insensitive with a string.Contains match requires at least one delimiter |
Falls back to normal string equals comparison, case sensitive
OriginFilterAttribute
public class OriginFilterAttribute : BaseApiFilterAttribute, IActionFilter, IAsyncActionFilter, IResultFilter, IAsyncResultFilter, IOrderedFilter, IFilterMetadata
Implements
Inherited Members
Constructors
Remarks
Validating as a regex expression requires any of these characters: ^$*?[
Validate case insensitive with a string.Contains match requires at least one delimiter |
Falls back to normal string equals comparison, case sensitive
Methods
Remarks
Validating as a regex expression requires any of these characters: ^$*?[
Validate case insensitive with a string.Contains match requires at least one delimiter |
Falls back to normal string equals comparison, case sensitive
Overrides
Implements
Extension Methods
}