mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +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;
|
|
}
|
|
}
|
|
}
|