Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Last active January 12, 2023 15:37
Embed
What would you like to do?
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.Use(async (context, next) =>
{
context.Response.Header.Add("Content-Security-Policy", "default-src 'self';");
await next();
});
app.UseMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment