mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-06 19:35:13 +02:00
11 lines
373 B
JavaScript
11 lines
373 B
JavaScript
// Safe: Handlebars.compile receives a constant template source string.
|
|
// Variables provided at render time are not template source and do not
|
|
// activate SSTI.
|
|
const Handlebars = require('handlebars');
|
|
|
|
function handler(req, res) {
|
|
const compiled = Handlebars.compile('Hello, {{name}}');
|
|
res.send(compiled({ name: req.query.name }));
|
|
}
|
|
|
|
module.exports = handler;
|