skip to Main Content

How to check if a context request path starts with a given string from a list of strings? – Asp.net

I have multiple if statements here which would check if a request path starts with a given string and return true if the condition is met if (context.Request.Path.StartsWithSegments("/abc/def", StringComparison.OrdinalIgnoreCase)) { return true; } if (context.Request.Path.StartsWithSegments("/pqr/xyz", StringComparison.OrdinalIgnoreCase)) { return true; }…

VIEW QUESTION
Back To Top
Search