2020-03-25 16:45:44 +01:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2020-02-20 10:57:22 +01:00
|
|
|
'use strict';
|
|
|
|
|
2020-01-21 09:50:05 +01:00
|
|
|
module.exports = function handler (req, res, next, opts) {
|
|
|
|
if (req.headers.example === 'abc')
|
|
|
|
res.writeHead (1);
|
|
|
|
else
|
|
|
|
res.writeHead (2);
|
|
|
|
|
|
|
|
res.end (opts.text);
|
|
|
|
};
|