X-Frame-Options Express Middleware

JSON →
library 1.0.0 ·javascript maintenance
verified May 27, 2026

The `x-frame-options` package provides a simple Express middleware to set the `X-Frame-Options` HTTP response header, a security mechanism designed to prevent clickjacking attacks by controlling whether a page can be rendered within `<iframe>`, `<frame>`, `<embed>`, or `<object>` elements. Currently at version 1.0.0, the package was last published over a decade ago. While still functional, the `X-Frame-Options` header itself is considered a legacy solution in modern web development. For comprehensive and more granular protection against framing-based attacks, the `frame-ancestors` directive within Content Security Policy (CSP) is the recommended approach. This package is typically used for supporting older browsers that might not fully support CSP, often in conjunction with CSP `frame-ancestors` to ensure broad compatibility. The middleware defaults the `X-Frame-Options` header value to 'Deny', offering the strongest initial protection.

total hits 18
actors 7 distinct systems
last hit 2d ago human
GPTBot
5
MetaBot
4
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇩🇪 Germany · 🇨🇦 Canada · 🇬🇧 United Kingdom