Skip to content

Commit

Permalink
Add appropriate header in startup.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidreneuw committed Jan 7, 2025
1 parent a05e54c commit 63a8979
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Portal/src/Datahub.Portal/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger<

app.UseAuthentication();
app.UseAuthorization();

app.Use(async (context, next) =>
{
context.Response.Headers.Append("X-Frame-Options", "SAMEORIGIN");
await next();
});

app.UseEndpoints(endpoints =>
{
Expand Down

0 comments on commit 63a8979

Please sign in to comment.