UNPKG

unblocker

Version:

Web proxy for evading internet censorship & general-purpose library for rewriting remote websites.

20 lines (16 loc) 612 B
"use strict"; var debug = require("debug")("unblocker:csp"); module.exports = function (/*config*/) { function csp(data) { // not removing csp could potentially prevent clients from using the proxy successfully. if (data.headers["content-security-policy"]) { debug("deleting content-security-policy header"); delete data.headers["content-security-policy"]; } if (data.headers["content-security-policy-report-only"]) { debug("deleting content-security-policy-report-only header"); delete data.headers["content-security-policy-report-only"]; } } return csp; };