mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 03:09:43 +08:00
10 lines
222 B
JavaScript
10 lines
222 B
JavaScript
const uuid = require('uuid/v4');
|
|
|
|
// nonce is designed to create a random value that can be used in conjunction
|
|
// with the csp middleware.
|
|
module.exports = (req, res, next) => {
|
|
res.locals.nonce = uuid();
|
|
|
|
next();
|
|
};
|