Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created January 13, 2023 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/768e34bc18727e5404354062f4df0106 to your computer and use it in GitHub Desktop.
Save lgolubyev/768e34bc18727e5404354062f4df0106 to your computer and use it in GitHub Desktop.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.Use(async (context, next) =>
{
Context.Response.Header.Add("Content-Security-Policy", "default 'self';");
await next ();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment