Created
November 25, 2015 00:17
-
-
Save nikmd23/88a772bef947e05692d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This Gist was created to answer @rionmonster's tweet at http://www.twitter.com/rionmonster/status/669288962444419072 | |
// This accurately reflects the state of Glimpse 2.0.0-Beta1, however we are already looking to improve this and these | |
// will most likey change. | |
// Feedback and use cases are welcome and wanted! | |
// This is a portion of Startup.cs | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddGlimpse().RunningServerWeb(options => | |
{ | |
// This basically controls access to resource the client needs. Think of these as the "client" | |
// or "read-only" resources | |
options.AllowClientAccess = httpContext => httpContext.User.IsInRole("Admin"); | |
// This controls access to resources the agents need. Think of these basically as "agent" | |
// or "write-only" resources | |
options.AllowAgentAccess = HttpContext => true; | |
}); | |
// Other service configuration... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment