Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/lib/node_modules/wonlog/node_modules/lusca/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 'use strict';
/**
* See https://www.w3.org/TR/referrer-policy/#referrer-policies
* @type {Array}
*/
var supportedValues = [
'',
'no-referrer',
'no-referrer-when-downgrade',
'same-origin',
'origin',
'strict-origin',
'origin-when-cross-origin',
'strict-origin-when-cross-origin',
'unsafe-url'
];
/**
* Default value.
* @type {String}
*/
var defaultValue = ''; // Browser should fallback to a Referrer Policy defined via other mechanisms elsewhere
/**
* Referrer-Policy
* https://scotthelme.co.uk/a-new-security-header-referrer-policy/
* Specification: https://www.w3.org/TR/referrer-policy/
* @param {String} value The Referrer-Policy header value, e.g. no-referrer, same-origin, origin.
*/
module.exports = function (value) {
if (supportedValues.indexOf(value) === -1 && process.env.NODE_ENV !== 'production') {
throw Error('Referrer-Policy header doesn\'t support value: ' + value);
}
return function referrerpolicy(req, res, next) {
res.header('referrer-policy', value || defaultValue);
next();
};
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |