You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using app.UseRedisInformation we are required to send an empty array of Allowed IP's even when we just want to use lambda function for IsClientAllowed in RedisInformationMiddleware to access /redis/connectionInfo and /redis/info.
app.UseRedisInformation(options =>
{
options.AllowedIPs = new System.Net.IPAddress[0];//required
options.AllowFunction = (HttpContext ctx) =>
{
// My custom logic
if (ctx.User.Identity.IsAuthenticated && ctx.User.IsInRole("Admin"))
return true;
return false;
};
});
Ideally, we should be able to skip the IP as needed.
Right now the source code is written that if there is no IP list provided it completely ignores the lambda function. Perhaps we can break IsClientAllowed in RedisInformationMiddleware to 3 different scenarios?
1). Both IP and lambda function are provided
2). Only IP list check
3). Only lambda function check
The text was updated successfully, but these errors were encountered:
When using app.UseRedisInformation we are required to send an empty array of Allowed IP's even when we just want to use lambda function for IsClientAllowed in RedisInformationMiddleware to access /redis/connectionInfo and /redis/info.
Ideally, we should be able to skip the IP as needed.
Right now the source code is written that if there is no IP list provided it completely ignores the lambda function. Perhaps we can break IsClientAllowed in RedisInformationMiddleware to 3 different scenarios?
1). Both IP and lambda function are provided
2). Only IP list check
3). Only lambda function check
The text was updated successfully, but these errors were encountered: