mirror of
https://github.com/github/codeql.git
synced 2026-03-27 17:58:17 +01:00
22 lines
461 B
C#
22 lines
461 B
C#
// semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll
|
|
using System;
|
|
using System.Web;
|
|
|
|
public class AddXFrameOptions : IHttpHandler
|
|
{
|
|
|
|
public void ProcessRequest(HttpContext ctx)
|
|
{
|
|
// GOOD: X-Frame-Options added
|
|
ctx.Response.AddHeader("X-Frame-Options", "DENY");
|
|
}
|
|
|
|
public bool IsReusable
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|