damianh / LimitsMiddleware

OWIN middleware to apply limits to an OWIN pipeline.
MIT License
0 stars 0 forks source link

Allow per-request adjustment of limits #1

Closed damianh closed 9 years ago

damianh commented 10 years ago

Should be able to do per-request adjustment of limits.

I don't think I want to expose the environment dictionary to the user, but a readonly interface of some sort. Something like:

builder.MaxConcurrentRequests(request => request.PathBase.StartsWith("/restricted", StringComparison.OrdinalIgnoreCase) ? 10000 : int.MaxValue)
thefringeninja commented 9 years ago

I'm assuming ATM that MaxQueryStringLength and MaxUrlLength do not need this functionality.

damianh commented 9 years ago

Yes, this wouldn't make sense there.