AspNetCoreRateLimit
AspNetCoreRateLimit copied to clipboard
Is there a way to do wildcard matching in Endpoint
Hello Currently I am using the following, this would match all endpoints starting with /workspaces. "GeneralRules": [ { "Endpoint": ":/workspaces/", "Period": "30s", "Limit": 10 } ]
I would like a way to set different throttling limits on different endpoints, something like this: "GeneralRules": [ { "Endpoint": ":/workspaces/{workspaceId}/alerts/{alertId}", "Period": "30s", "Limit": 10 }, { "Endpoint": ":/workspaces/{workspaceId}/analysis/{analysisId}", "Period": "30s", "Limit": 20 }, { "Endpoint": ":", "Period": "30s", "Limit": 50 } ]
Is there a way to do this?
just replace {workspaceId} by * ex : Endpoint": "*:/workspaces/{workspaceId}/alerts/{alertId}", becomes Endpoint": "*:/workspaces/*/alerts/*",
I have similar requirement as well, where I need to match on subset of request path: e.g. /odata/mnt/asset I would like set Endpoint to "/odata/".
I tried few options: Endpoint: ":/odata/" Endpont: "/odata/" Endpont: "/odata/*"
but none of these worked. Any ideas?
Thanks in advance Dan