2020-03-25 16:45:44 +01:00

18 lines
427 B
JavaScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of Snippeteer which is released under BSD-3-Clause.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, March 2020
*/
'use strict';
module.exports = function handler (req, res, next, opts) {
if (req.headers.example === 'abc')
res.writeHead (1);
else
res.writeHead (2);
res.end (opts.text);
};