Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

xfo-whitelist

jbuck6Apache-2.00.1.0

Apply X-Frame-Options based on a whitelist

xframe, xfo, whitelist, x-frame-options

readme

xfo-whitelist

Connect/Express middleware to apply X-Frame-Options based on a whitelist

Quick start

Install using npm: npm install --save xfo-whitelist

Include the module inside your application:

var express = require("express"),
    xfo = require("xfo-whitelist"),

var app = express();

// Add X-Frame-Options: DENY to all requests but "/embed.html"
app.use(xfo(["/embed.html"]));
app.use(express.static(__dirname + "/public"));