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
If you are running into ASP.NET Core application, there is a specific package that you can use in order to make StackExchange.Redis.Extensions configuration easier.
3
+
If you are running an ASP.NET Core application, there is a specific package that makes StackExchange.Redis.Extensions configuration easier.
Sometimes is helpfull to expose the redis information outside of you application, like a json endpoint, in order to monitor the connection, the status of the server an so on.
3
+
Sometimes it is helpful to expose Redis information outside of your application as a JSON endpoint, in order to monitor the connection, the status of the server, and so on.
4
4
5
5
For this we have created a specific middleware that you can use like this:
Of course these responses could contains sensilbe data, for this reason you can allow access only to a specific set of IP Addresses of you custom login.
49
+
Of course these responses could contain sensitive data, so you can restrict access to a specific set of IP addresses or apply your own custom authorization logic:
// AllowFunction has higher priority than AllowedIPs if not null.
58
+
options.AllowFunction= (HttpContextctx) =>
162
59
{
163
-
x.AllowedIPs=Array.Empty<IPAddress>();
164
-
// `AllowFunction` has higher priority than `AllowedIPs` if not null.
165
-
x.AllowFunction= (HttpContextctx) =>
166
-
{
167
-
// My custom logic.
168
-
returntrue;
169
-
};
170
-
});
171
-
}
60
+
// Your custom authorization logic.
61
+
returntrue;
62
+
};
63
+
});
64
+
65
+
app.Run();
172
66
```
173
67
174
-
**Warnings**:
68
+
**Warnings**:
175
69
176
-
Since 11.0, the `RedisInformationMiddleware` has some break changes. See [issue#430](https://github.com/imperugo/StackExchange.Redis.Extensions/issues/430) for details.
70
+
Since 11.0, the `RedisInformationMiddleware` has some breaking changes. See [issue#430](https://github.com/imperugo/StackExchange.Redis.Extensions/issues/430) for details.
0 commit comments