Skip to content

Commit 5255107

Browse files
committed
fix(security): agrega X-Frame-Options en Program.cs
1 parent c89cf30 commit 5255107

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

backend/SENATICRUD/SENATICRUD/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ private static void Main(string[] args)
2222

2323
app.UseHttpsRedirection();
2424

25+
// Agregar header X-Frame-Options para prevenir clickjacking
26+
app.Use(async (context, next) =>
27+
{
28+
context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
29+
await next();
30+
});
31+
2532
app.UseAuthorization();
2633

2734
app.MapControllers();

0 commit comments

Comments
 (0)