Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MahdiKarimipour/4cee392df04ad6fcb4f49ad3f56a3e41 to your computer and use it in GitHub Desktop.
Save MahdiKarimipour/4cee392df04ad6fcb4f49ad3f56a3e41 to your computer and use it in GitHub Desktop.
app.Use(async (context,next) =>
{
var url = context.Request.Path.Value;
if (url.Contains("/home/privacy"))
{
context.Response.Redirect("https://fully-qualified-domain-name/etc")
return;
}
await next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment