Skip to content

Instantly share code, notes, and snippets.

View MJomaa's full-sized avatar

Mahmut Jomaa MJomaa

  • Software Engineer
  • Switzerland
View GitHub Profile
@MJomaa
MJomaa / BadBotMiddleWare.cs
Last active September 8, 2015 07:35
Middleware to block bad bots in ASP.NET 5
public class BadBotMiddleWare
{
private readonly RequestDelegate _next;
public ImmutableHashSet<string> List { get; set; }
public BadBotMiddleWare(RequestDelegate next)
{
_next = next;
List = new[]
{